better clang detection

This commit is contained in:
Unbit
2013-06-20 11:00:05 +02:00
parent 88e67a74e5
commit d3e7668d0a
2 changed files with 7 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
int main() {}
+6 -1
View File
@@ -30,7 +30,12 @@ GCC = os.environ.get('CC', sysconfig.get_config_var('CC'))
if not GCC:
GCC = 'gcc'
CPP = os.environ.get('CPP', 'cpp')
def get_preprocessor():
if 'clang' in GCC:
return 'clang -xc core/clang_fake.c'
return 'cpp'
CPP = os.environ.get('CPP', get_preprocessor())
try:
CPUCOUNT = int(os.environ.get('CPUCOUNT', -1))