aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJukka Jylanki <jujjyl@gmail.com>2014-04-09 23:19:11 +0300
committerJukka Jylänki <jujjyl@gmail.com>2014-04-10 00:37:55 +0300
commitb239fb1ed3d91bd98ddafa1bfd6af6a57daa32ca (patch)
treec57c617735c6dc2686f0e51f68c8db0048e6ba67 /tests
parent19c1821f0e9740c6fcf6ed5b2bdf976d2b098558 (diff)
When we build native OSX executables with Clang, we must tell Clang which OSX SDK version we are targeting. Add a function CLANG_NATIVE_ARGS() that returns a list of compiler args that need to be appended when building native executables for the current platform, which for OSX automatically find an SDK to target. Make the machinery lazy and cached so that it's not invoked if native executables are not built, and that it's invoked only once when needed. Fixed test other.test_bad_triple on OSX.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_other.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index aae399c8..854f88b1 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -2577,7 +2577,7 @@ int main()
assert 'asm.js' in output, 'spidermonkey should mention asm.js compilation: ' + output
def test_bad_triple(self):
- Popen([CLANG, path_from_root('tests', 'hello_world.c'), '-c', '-emit-llvm', '-o', 'a.bc'], stdout=PIPE, stderr=PIPE).communicate()
+ Popen([CLANG, path_from_root('tests', 'hello_world.c'), '-c', '-emit-llvm', '-o', 'a.bc'] + get_clang_native_args(), stdout=PIPE, stderr=PIPE).communicate()
out, err = Popen([PYTHON, EMCC, 'a.bc'], stdout=PIPE, stderr=PIPE).communicate()
assert 'warning' in err, err
assert 'incorrect target triple' in err, err