diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-27 20:09:09 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-27 20:09:09 -0800 |
commit | 40f2ae9e943a66cd8a3fa2ef1375fb9d81fcd3bd (patch) | |
tree | 8e2b7122fec9580b81f8f98ae29c9c2023bb3ce4 | |
parent | 49d7f0d857192ff18291e9a87997d3b6015fc4e3 (diff) |
EMCC_CFLAGS support
-rwxr-xr-x | emcc | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -99,8 +99,11 @@ LEAVE_INPUTS_RAW = os.environ.get('EMCC_LEAVE_INPUTS_RAW') # Do not compile .ll AUTODEBUG = os.environ.get('EMCC_AUTODEBUG') # If set to 1, we will run the autodebugger (the automatic debugging tool, see tools/autodebugger). # Note that this will disable inclusion of libraries. This is useful because including # dlmalloc makes it hard to compare native and js builds +EMCC_CFLAGS = os.environ.get('EMCC_CFLAGS') # Additional compiler flags that we treat as if they were passed to us on the commandline + +if DEBUG: print >> sys.stderr, '\nemcc invocation: ', ' '.join(sys.argv), (' + ' + EMCC_CFLAGS if EMCC_CFLAGS else '') +if EMCC_CFLAGS: sys.argv.append(EMCC_CFLAGS) -if DEBUG: print >> sys.stderr, '\nemcc invocation: ', ' '.join(sys.argv) if DEBUG and LEAVE_INPUTS_RAW: print >> sys.stderr, 'emcc: leaving inputs raw' stdout = PIPE if not DEBUG else None # suppress output of child processes @@ -223,6 +226,9 @@ The input file(s) can be either source code files that Clang can handle (C or C++), LLVM bitcode in binary form, or LLVM assembly files in human-readable form. +emcc is affected by several environment variables. For details, view +the source of emcc (search for 'os.environ'). + ''' % (this, this, this) exit(0) |