aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-12-05 16:27:02 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-12-13 13:47:49 +0200
commit93f2e138610d735cbae7004d43f1370abeae101e (patch)
treeb3e5156d51a8b265edccc06bb335350a59c19eb5 /emcc
parent3e061d95104b88d6209d892bbda24e18a1539073 (diff)
Add new emcc command line parameter --em-config that allows specifying the location of the .emscripten configuration file from the command line. This overrides and has the same meaning as the environment variable EM_CONFIG.
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/emcc b/emcc
index 029d60a1..d386c0ed 100755
--- a/emcc
+++ b/emcc
@@ -499,6 +499,12 @@ Options that are modified or new in %s include:
--proxy-to-worker Generates both html and js files. The main
program is in js, and the html proxies to/from it.
+ --em-config Specifies the location of the .emscripten configuration
+ file for the current compiler run. If not specified,
+ the environment variable EM_CONFIG is read for this
+ file, and if that is not set, the default location
+ ~/.emscripten is assumed.
+
The target file, if specified (-o <target>), defines what will
be generated:
@@ -963,6 +969,10 @@ try:
if not absolute_warning_shown and os.path.isabs(path_name):
logging.warning ('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript). Pass \'-Wno-warn-absolute-paths\' to emcc to hide this warning.') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not
absolute_warning_shown = True
+ elif newargs[i] == '--em-config':
+ # This option is parsed in tools/shared.py, here only clean it up from being passed to clang.
+ newargs[i] = ''
+ newargs[i+1] = ''
newargs = [ arg for arg in newargs if arg is not '' ]
# If user did not specify a default -std for C++ code, specify the emscripten default.