aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xemcc6
1 files changed, 4 insertions, 2 deletions
diff --git a/emcc b/emcc
index 63c58039..63c98a25 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: