diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-09 20:26:35 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-09 20:26:35 -0800 |
commit | 079f019c359eafb416b90da21412cabccf8672d0 (patch) | |
tree | 168def8fa4bbb561229a8013255eabdaf8df3297 | |
parent | dae556e5aa0913a7901db9cfa7497d2bb3425d8b (diff) |
detect .C as c; fixes #2109
-rwxr-xr-x | emcc | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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: |