From 079f019c359eafb416b90da21412cabccf8672d0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 9 Feb 2014 20:26:35 -0800 Subject: [PATCH] detect .C as c; fixes #2109 --- emcc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emcc b/emcc index 63c580391..63c98a25d 100755 --- a/emcc +++ b/emcc @@ -56,7 +56,9 @@ from tools.response_file import read_response_file # endings = dot + a suffix, safe to test by filename.endswith(endings) C_ENDINGS = ('.c', '.C') CXX_ENDINGS = ('.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC') -SOURCE_ENDINGS = C_ENDINGS + CXX_ENDINGS + ('.m', '.mm') +OBJC_ENDINGS = ('.m',) +OBJCXX_ENDINGS = ('.mm',) +SOURCE_ENDINGS = C_ENDINGS + CXX_ENDINGS + OBJC_ENDINGS + OBJCXX_ENDINGS BITCODE_ENDINGS = ('.bc', '.o', '.obj') DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll') STATICLIB_ENDINGS = ('.a',) @@ -714,7 +716,7 @@ use_cxx = True for i in range(1, len(sys.argv)): arg = sys.argv[i] if not arg.startswith('-'): - if arg.endswith(('.c','.m')): + if arg.endswith(C_ENDINGS + OBJC_ENDINGS): use_cxx = False if '-M' in sys.argv or '-MM' in sys.argv: