diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 21:22:46 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-23 21:22:46 -0800 |
commit | cb046b74b3777846786dcee96d282efaedb4f800 (patch) | |
tree | 04ae0961c2c30e3824a7d031b77ec9462a7141c3 /tests | |
parent | 821316d6173441fc02f3d49a5b430b179e1f302a (diff) |
do not link in dynamic libraries when compiling to bitcode in intermediate stages, only link them in when building to js or html. closes #1886
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_other.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_other.py b/tests/test_other.py index a6e8b533..c26052a3 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -1414,12 +1414,11 @@ f.close() } ''') - # This lets us link the same dynamic lib twice. We will need to link it in manually at the end. - compiler = [PYTHON, EMCC, '--ignore-dynamic-linking'] + compiler = [PYTHON, EMCC] # Build libfile normally into an .so Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libfile.cpp'), '-o', os.path.join(self.get_dir(), 'libdir', 'libfile.so')]).communicate() - # Build libother and dynamically link it to libfile - but add --ignore-dynamic-linking + # Build libother and dynamically link it to libfile Popen(compiler + [os.path.join(self.get_dir(), 'libdir', 'libother.cpp'), '-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile', '-o', os.path.join(self.get_dir(), 'libdir', 'libother.so')]).communicate() # Build the main file, linking in both the libs Popen(compiler + [os.path.join(self.get_dir(), 'main.cpp'), '-L' + os.path.join(self.get_dir(), 'libdir'), '-lfile', '-lother', '-c']).communicate() |