diff options
117 files changed, 17558 insertions, 963 deletions
@@ -20,3 +20,5 @@ under the licensing terms detailed in LICENSE. * David Benjamin <davidben@mit.edu> * Pierre Renaux <pierre@talansoft.com> * Brian Anderson <banderson@mozilla.com> +* Jon Bardin <diclophis@gmail.com> +* Jukka Jylänki <jujjyl@gmail.com> diff --git a/em-config b/em-config new file mode 100755 index 00000000..dee399ed --- /dev/null +++ b/em-config @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +''' +This is a helper tool which is designed to make it possible +for other apps to read emscripten's configuration variables +in a unified way. Usage: + + em-config VAR_NAME + +This tool prints the value of the variable to stdout if one +is found, or exits with 1 if the variable does not exist. +''' + +import os, sys, re +from tools import shared + +if len(sys.argv) != 2 or \ + not re.match(r"^[\w\W_][\w\W_\d]*$", sys.argv[1]) or \ + not (sys.argv[1] in dir(shared)): + print 'Usage: em-config VAR_NAME' + exit(1) + +print eval('shared.' + sys.argv[1]) + @@ -272,6 +272,10 @@ Options that are modified or new in %s include: --js-library <lib> A JavaScript library to use in addition to those in Emscripten's src/library_* + -v Turns on verbose output. This will pass + -v to Clang, and also enable EMCC_DEBUG + to details emcc's operations + The target file, if specified (-o <target>), defines what will be generated: @@ -293,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) @@ -513,6 +520,10 @@ try: elif newargs[i] == '--ignore-dynamic-linking': ignore_dynamic_linking = True newargs[i] = '' + elif newargs[i] == '-v': + shared.COMPILER_OPTS += ['-v'] + DEBUG = 1 + newargs[i] = '' elif newargs[ |