fix -s bug with a new -compiler param starting on the next arg
This commit is contained in:
Родитель
5d89a5daec
Коммит
12706b0bd3
2
emcc
2
emcc
|
@ -164,7 +164,7 @@ elif '-dumpmachine' in sys.argv:
|
|||
|
||||
def is_minus_s_for_emcc(newargs, i):
|
||||
assert newargs[i] == '-s'
|
||||
if i+1 < len(newargs) and '=' in newargs[i+1]: # -s OPT=VALUE is for us, -s by itself is a linker option
|
||||
if i+1 < len(newargs) and '=' in newargs[i+1] and not newargs[i+1].startswith('-'): # -s OPT=VALUE is for us, -s by itself is a linker option
|
||||
return True
|
||||
else:
|
||||
logging.warning('treating -s as linker option and not as -s OPT=VALUE for js compilation')
|
||||
|
|
|
@ -5690,3 +5690,8 @@ int main() {
|
|||
process = Popen([PYTHON, EMCC] + '-l m -l c -I'.split() + [path_from_root('tests', 'include_test'), path_from_root('tests', 'lib_include_flags.c')], stdout=PIPE, stderr=PIPE)
|
||||
process.communicate()
|
||||
assert process.returncode is 0, 'Empty -l/-L/-I flags should read the next arg as a param'
|
||||
|
||||
def test_dash_s(self):
|
||||
print check_execute([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-s', '-std=c++03'])
|
||||
self.assertContained('hello, world!', run_js('a.out.js'))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче