diff --git a/core/clang_fake.c b/core/clang_fake.c new file mode 100644 index 00000000..237c8ce1 --- /dev/null +++ b/core/clang_fake.c @@ -0,0 +1 @@ +int main() {} diff --git a/uwsgiconfig.py b/uwsgiconfig.py index ce0cd60a..b6b04490 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -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))