diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/settings_template_readonly.py | 47 | ||||
-rw-r--r-- | tools/shared.py | 4 |
2 files changed, 49 insertions, 2 deletions
diff --git a/tools/settings_template_readonly.py b/tools/settings_template_readonly.py new file mode 100644 index 00000000..45a30569 --- /dev/null +++ b/tools/settings_template_readonly.py @@ -0,0 +1,47 @@ +# This file will be copied to ~/.emscripten if that file doesn't exist. Or, this is that copy. +# IMPORTANT: Edit the *copy* with the right paths! +# Note: If you put paths relative to the home directory, do not forget os.path.expanduser + +import os + +# this helps projects using emscripten find it +EMSCRIPTEN_ROOT = os.path.expanduser(os.getenv('EMSCRIPTEN') or '/opt/emscripten') +LLVM_ROOT = os.path.expanduser(os.getenv('LLVM') or '/usr/bin') + +# See below for notes on which JS engine(s) you need +NODE_JS = 'node' +SPIDERMONKEY_ENGINE = [ + os.path.expanduser(os.getenv('SPIDERMONKEY') or 'js'), '-m', '-n'] +V8_ENGINE = os.path.expanduser(os.getenv('V8') or 'd8') + +JAVA = 'java' + +TEMP_DIR = '/tmp' # You will need to modify this on Windows + +#CLOSURE_COMPILER = '..' # define this to not use the bundled version + +######################################################################################################## + + +# Pick the JS engine to use for running the compiler. This engine must exist, or +# nothing can be compiled. +# +# Recommendation: If you already have node installed, use that. Otherwise, build v8 or +# spidermonkey from source. Any of these three is fine, as long as it's +# a recent version (especially for v8 and spidermonkey). + +COMPILER_ENGINE = NODE_JS +#COMPILER_ENGINE = V8_ENGINE +#COMPILER_ENGINE = SPIDERMONKEY_ENGINE + + +# All JS engines to use when running the automatic tests. Not all the engines in this list +# must exist (if they don't, they will be skipped in the test runner). +# +# Recommendation: If you already have node installed, use that. If you can, also build +# spidermonkey from source as well to get more test coverage (node can't +# run all the tests due to node issue 1669). v8 is currently not recommended +# here because of v8 issue 1822. + +JS_ENGINES = [NODE_JS, SPIDERMONKEY_ENGINE] + diff --git a/tools/shared.py b/tools/shared.py index 24e6b707..8adff34a 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -20,7 +20,7 @@ if '\n' in EM_CONFIG: else: CONFIG_FILE = os.path.expanduser(EM_CONFIG) if not os.path.exists(CONFIG_FILE): - shutil.copy(path_from_root('settings.py'), CONFIG_FILE) + shutil.copy(path_from_root('tools', 'settings_template_readonly.py'), CONFIG_FILE) print >> sys.stderr, ''' ============================================================================== Welcome to Emscripten! @@ -103,7 +103,7 @@ def check_sanity(force=False): try: subprocess.call([JAVA, '-version'], stdout=PIPE, stderr=PIPE) except: - print >> sys.stderr, 'WARNING: java does not seem to exist, required for closure compiler. -O2 and above will fail. You need to define JAVA in ~/.emscripten (see settings.py)' + print >> sys.stderr, 'WARNING: java does not seem to exist, required for closure compiler. -O2 and above will fail. You need to define JAVA in ~/.emscripten' if not os.path.exists(CLOSURE_COMPILER): print >> sys.stderr, 'WARNING: Closure compiler (%s) does not exist, check the paths in %s. -O2 and above will fail' % (CLOSURE_COMPILER, EM_CONFIG) |