Closed floooh closed 9 years ago
It doesn't look like emar has any support for --em-config
? I think just emcc has that. Would it be useful if we added it to emar?
emar
does in fact obey --em-config
, but indirectly.
This code is at top level in tools/shared.py
:
try:
EM_CONFIG = sys.argv[sys.argv.index('--em-config')+1]
# Emscripten compiler spawns other processes, which can reimport shared.py, so make sure that
# those child processes get the same configuration file by setting it to the currently active environment.
os.environ['EM_CONFIG'] = EM_CONFIG
except:
EM_CONFIG = os.environ.get('EM_CONFIG')
I have a patch for this.
Yay cool :) Some background info for @kripken:
oryol (https://github.com/floooh/oryol) tries to install 3rd party sdks (e.g. emscripten or the android ndk) in a local subdirectory without messing up global settings on the machine (central config files, environemnt variables, registry settings). This works because the project's build system has its own cmake toolchain files which can override most default settings and is generally useful because it doesn't mess with any other SDKs installed on the same machine, and oryol automatically can pin emscripten to a specific version if needed.
I think currently this also only works with directly checking out emscripten and fastcomp 'the old way', not with the official emscripten SDK (this seems to always write .emscripten to ~/.emscripten).
Ok, I see. Let's continue discussion in that pull.
It looks like emar reads the --em-config cmd line param, but then passes it to llvm-ar which complains about it and stops:
Here's output from calling emar with a non-standard .emscripten file location:
emar recognizes the --em-config option, and loads the .emscripten file, but then doesn't remove the option before calling llvm-ar.