mesonbuild/meson

Speed-up compiler checks by parallelizing where possible

Open

#3 635 ouverte le 26 mai 2018

Voir sur GitHub
 (53 commentaires) (5 réactions) (0 assignés)Python (1 465 forks)batch import
compilersenhancementhelp wantedperf

Métriques du dépôt

Stars
 (4 978 stars)
Métriques de merge PR
 (Merge moyen 139j 13h) (51 PRs mergées en 30 j)

Description

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.

Guide contributeur