Don't pass all emcc command line inputs e.g. those of form '-DsomeDefine=1' etc. to shared.Building.is_ar() for testing whether a file by that name is a LLVM archive file.

This commit is contained in:
Jukka Jylänki 2012-09-22 12:58:32 +03:00
Родитель 2b03402687
Коммит 4f25d496a1
1 изменённых файлов: 1 добавлений и 1 удалений

2
emcc
Просмотреть файл

@ -727,7 +727,7 @@ try:
prev = newargs[i-1] prev = newargs[i-1]
if prev in ['-MT', '-install_name']: continue # ignore this gcc-style argument if prev in ['-MT', '-install_name']: continue # ignore this gcc-style argument
if arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + DYNAMICLIB_SUFFIXES + ASSEMBLY_SUFFIXES) or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs if not arg.startswith('-') and (arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + DYNAMICLIB_SUFFIXES + ASSEMBLY_SUFFIXES) or shared.Building.is_ar(arg)): # we already removed -o <target>, so all these should be inputs
newargs[i] = '' newargs[i] = ''
if os.path.exists(arg): if os.path.exists(arg):
if arg.endswith(SOURCE_SUFFIXES): if arg.endswith(SOURCE_SUFFIXES):