From: Paul Brossier Date: Tue, 18 Sep 2018 21:04:41 +0000 (+0200) Subject: python/lib/gen_external.py: pass '-x c' to emcc only X-Git-Tag: 0.4.7~15 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=dbdb48a8e680500a2666908bb971daeca4beac03 python/lib/gen_external.py: pass '-x c' to emcc only --- diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py index 1e35bfd0..6a36d451 100644 --- a/python/lib/gen_external.py +++ b/python/lib/gen_external.py @@ -77,7 +77,8 @@ def get_preprocessor(): print("Warning: could not guess preprocessor, using env's CC") cpp_cmd = os.environ.get('CC', 'cc').split() cpp_cmd += ['-E'] - cpp_cmd += ['-x', 'c'] # force C language (emcc defaults to c++) + if 'emcc' in cpp_cmd: + cpp_cmd += ['-x', 'c'] # emcc defaults to c++, force C language return cpp_cmd