From dbdb48a8e680500a2666908bb971daeca4beac03 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 18 Sep 2018 23:04:41 +0200 Subject: [PATCH] python/lib/gen_external.py: pass '-x c' to emcc only --- python/lib/gen_external.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.11.0