mesonbuild/meson
Vedi su GitHubSpeed-up compiler checks by parallelizing where possible
Open
#3635 aperta il 26 mag 2018
compilersenhancementhelp wantedperf
Metriche repository
- Star
- (4978 star)
- Metriche merge PR
- (Merge medio 139g 13h) (51 PR mergiate in 30 g)
Descrizione
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.