support emcc -v with no further arguments
This commit is contained in:
Родитель
bfb5eda13f
Коммит
d4cfd7a658
3
emcc
3
emcc
|
@ -297,6 +297,9 @@ the source of emcc (search for 'os.environ').
|
|||
|
||||
''' % (this, this, this)
|
||||
exit(0)
|
||||
elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs
|
||||
print 'emcc (Emscripten GCC-like replacement) 2.0'
|
||||
exit(subprocess.call([shared.CLANG, '-v']))
|
||||
|
||||
# If this is a configure-type thing, do not compile to JavaScript, instead use clang
|
||||
# to compile to a native binary (using our headers, so things make sense later)
|
||||
|
|
|
@ -6305,6 +6305,10 @@ This is free and open source software under the MIT license.
|
|||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
''', output[0].replace('\r', ''), output[1].replace('\r', ''))
|
||||
|
||||
# -v, without input files
|
||||
output = Popen(['python', compiler, '-v'], stdout=PIPE, stderr=PIPE).communicate()
|
||||
self.assertContained('''clang version''', output[1].replace('\r', ''), output[1].replace('\r', ''))
|
||||
|
||||
# --help
|
||||
output = Popen(['python', compiler, '--help'], stdout=PIPE, stderr=PIPE).communicate()
|
||||
self.assertContained('''%s [options] file...
|
||||
|
|
Загрузка…
Ссылка в новой задаче