diff options
author | comex | 2015-08-07 17:03:51 -0400 |
---|---|---|
committer | comex | 2015-08-07 17:08:31 -0400 |
commit | a4f89a7327e5b5dc2a64e51840aa19c7ac89071d (patch) | |
tree | ad8f4887c7b7047af85d40a98b598fd3ad134c61 /script/mconfig.py | |
parent | future proofing (diff) | |
download | substitute-a4f89a7327e5b5dc2a64e51840aa19c7ac89071d.tar.gz |
fixes
Diffstat (limited to 'script/mconfig.py')
-rw-r--r-- | script/mconfig.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/script/mconfig.py b/script/mconfig.py index 1afcd0d..4afccad 100644 --- a/script/mconfig.py +++ b/script/mconfig.py @@ -591,8 +591,11 @@ class UnixToolchain(object): def find_tool(self, tool, failure_notes): # special cases if tool.name == 'cpp': - cc = self.machine.c_tools().cc() - if cc is not None: + try: + cc = self.machine.c_tools().cc.argv() + except DependencyNotFoundException: + pass + else: return cc + ['-E'] return self.find_tool_normal(tool, failure_notes) @@ -612,7 +615,7 @@ def calc_darwin_target_conditionals(ctools, settings): log('* Error: Darwin platform but no TargetConditionals.h?\n') raise DependencyNotFoundException # note: TARGET_CPU are no good because there could be multiple arches - return {env: bool(val) for (env, val) in re.findall('^#define (TARGET_OS_[^ ]*)\s+(0|1)\s*$', so, re.M)} + return {env: bool(int(val)) for (env, val) in re.findall('^#define (TARGET_OS_[^ ]*)\s+(0|1)\s*$', so, re.M)} # Reads a binary or XML plist (on OS X) def read_plist(gunk): |