This commit is contained in:
Alon Zakai 2015-05-22 10:52:23 -07:00
Родитель 8140f30d2f
Коммит c331681967
2 изменённых файлов: 8 добавлений и 0 удалений

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

@ -177,6 +177,10 @@ elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs
shared.check_sanity(force=True)
exit(code)
elif '-dumpmachine' in sys.argv:
print shared.get_llvm_target()
exit(0)
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

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

@ -28,6 +28,10 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
self.assertContained('Display this information', output[0])
self.assertContained('Most clang options will work', output[0])
# -dumpmachine
output = Popen([PYTHON, compiler, '-dumpmachine'], stdout=PIPE, stderr=PIPE).communicate()
self.assertContained(get_llvm_target(), output[0])
# emcc src.cpp ==> writes a.out.js
self.clear()
output = Popen([PYTHON, compiler, path_from_root('tests', 'hello_world' + suffix)], stdout=PIPE, stderr=PIPE).communicate()