detect .C as c; fixes #2109
This commit is contained in:
Родитель
dae556e5aa
Коммит
079f019c35
6
emcc
6
emcc
|
@ -56,7 +56,9 @@ from tools.response_file import read_response_file
|
||||||
# endings = dot + a suffix, safe to test by filename.endswith(endings)
|
# endings = dot + a suffix, safe to test by filename.endswith(endings)
|
||||||
C_ENDINGS = ('.c', '.C')
|
C_ENDINGS = ('.c', '.C')
|
||||||
CXX_ENDINGS = ('.cpp', '.cxx', '.cc', '.CPP', '.CXX', '.CC')
|
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')
|
BITCODE_ENDINGS = ('.bc', '.o', '.obj')
|
||||||
DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll')
|
DYNAMICLIB_ENDINGS = ('.dylib', '.so', '.dll')
|
||||||
STATICLIB_ENDINGS = ('.a',)
|
STATICLIB_ENDINGS = ('.a',)
|
||||||
|
@ -714,7 +716,7 @@ use_cxx = True
|
||||||
for i in range(1, len(sys.argv)):
|
for i in range(1, len(sys.argv)):
|
||||||
arg = sys.argv[i]
|
arg = sys.argv[i]
|
||||||
if not arg.startswith('-'):
|
if not arg.startswith('-'):
|
||||||
if arg.endswith(('.c','.m')):
|
if arg.endswith(C_ENDINGS + OBJC_ENDINGS):
|
||||||
use_cxx = False
|
use_cxx = False
|
||||||
|
|
||||||
if '-M' in sys.argv or '-MM' in sys.argv:
|
if '-M' in sys.argv or '-MM' in sys.argv:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче