From 806b410c6a7db0d6d56145d3cc9381273163cc9a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 24 Nov 2013 14:10:35 +0100 Subject: build: cache compiler defines on the configure context directly --- waftools/detections/compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'waftools/detections/compiler.py') diff --git a/waftools/detections/compiler.py b/waftools/detections/compiler.py index 1fee446409..bad1da7673 100644 --- a/waftools/detections/compiler.py +++ b/waftools/detections/compiler.py @@ -45,10 +45,10 @@ __compiler_map__ = { } def __apply_map__(ctx, fnmap): - if 'CC_ENV_VARS' not in ctx.env: - ctx.env.CC_ENV_VARS = str(__get_cc_env_vars__(ctx.env.CC)) + if not getattr(ctx, 'CC_ENV_VARS', None): + ctx.CC_ENV_VARS = str(__get_cc_env_vars__(ctx.env.CC)) for k, fn in fnmap.items(): - if ctx.env.CC_ENV_VARS.find(k) > 0: + if ctx.CC_ENV_VARS.find(k) > 0: fn(ctx) def configure(ctx): -- cgit v1.2.3