mesonbuild/meson

Speed-up compiler checks by parallelizing where possible

Open

#3,635 创建于 2018年5月26日

在 GitHub 查看
 (53 评论) (5 反应) (0 负责人)Python (1,465 fork)batch import
compilersenhancementhelp wantedperf

仓库指标

Star
 (4,978 star)
PR 合并指标
 (平均合并 139天 13小时) (30 天内合并 51 个 PR)

描述

Some compiler checks can be parallelized, for example:

  • get_supported_arguments()
  • get_supported_link_arguments()
  • cross_compute_int(): there are two branches at each guess, so we can run both at the same time, which will improve the worst-case time.

We should also add map-like API for batch-processing several has_function() and has_header() checks at once and sets values in a configuration_data() object, usually of the form:

cdata = configuration_data()
if cc.has_function(func_name, prefix: includes)
   cdata.set(func_name.to_upper().underscorify())
endif

Usually this requires lambda support (or similar) to be able to do this, but since the function in this case is almost always the same, we can hard-code it in Meson. It would be a good default in case we want to extend it later anyway.

贡献者指南