gen_external.py : force c compiler (emcc defaults to c++)
authorMartin Hermant <martin.hermant@gmail.com>
Mon, 29 May 2017 14:59:12 +0000 (10:59 -0400)
committerMartin Hermant <martin.hermant@gmail.com>
Mon, 29 May 2017 14:59:12 +0000 (10:59 -0400)
python/lib/gen_external.py

index c1c69bd..702b6fd 100644 (file)
@@ -72,7 +72,7 @@ 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++)
     return cpp_cmd
 
 def get_cpp_objects(header=header, usedouble=False):