@@ -22,6 +22,7 @@ def _appendToSubstitution(substitutions, key, value):
2222
2323def configure (parameters , features , config , lit_config ):
2424 note = lambda s : lit_config .note ("({}) {}" .format (config .name , s ))
25+ debug = lambda s : lit_config .dbg ("({}) {}" .format (config .name , s ))
2526 config .environment = dict (os .environ )
2627
2728 # Apply the actions supplied by parameters to the configuration first, since
@@ -31,25 +32,23 @@ def configure(parameters, features, config, lit_config):
3132 actions = param .getActions (config , lit_config .params )
3233 for action in actions :
3334 action .applyTo (config )
34- if lit_config .debug :
35- note (
36- "Applied '{}' as a result of parameter '{}'" .format (
37- action .pretty (config , lit_config .params ),
38- param .pretty (config , lit_config .params ),
39- )
35+ debug (
36+ "Applied '{}' as a result of parameter '{}'" .format (
37+ action .pretty (config , lit_config .params ),
38+ param .pretty (config , lit_config .params ),
4039 )
40+ )
4141
4242 # Then, apply the automatically-detected features.
4343 for feature in features :
4444 actions = feature .getActions (config )
4545 for action in actions :
4646 action .applyTo (config )
47- if lit_config .debug :
48- note (
49- "Applied '{}' as a result of implicitly detected feature '{}'" .format (
50- action .pretty (config , lit_config .params ), feature .pretty (config )
51- )
47+ debug (
48+ "Applied '{}' as a result of implicitly detected feature '{}'" .format (
49+ action .pretty (config , lit_config .params ), feature .pretty (config )
5250 )
51+ )
5352
5453 # Print the basic substitutions
5554 for sub in ("%{cxx}" , "%{flags}" , "%{compile_flags}" , "%{link_flags}" , "%{benchmark_flags}" , "%{exec}" ):
0 commit comments