aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-05 15:15:04 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-05 15:15:04 -0800
commit7ac8be1ba4e3764257d0881c0f8e41e0a9e65d1b (patch)
tree25e48bf15a0b2ed99888279fb1b628331754e240
parentd2f91efe1fcf98f59a8d142880e1910ddd2ff726 (diff)
disable runtimelink test when using LLVM opts
-rw-r--r--src/settings.js2
-rw-r--r--tests/runner.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/settings.js b/src/settings.js
index 9dba6a24..b3442c01 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -183,6 +183,8 @@ var BUILD_AS_SHARED_LIB = 0; // Whether to build the code as a shared library, w
var RUNTIME_LINKED_LIBS = []; // If this is a main file (BUILD_AS_SHARED_LIB == 0), then
// we will link these at runtime. They must have been built with
// BUILD_AS_SHARED_LIB == 2.
+ // NOTE: LLVM optimizations run separately on the main file and
+ // linked libraries can break things.
var RUNTIME_TYPE_INFO = 0; // Whether to expose type info to the script at run time. This
// increases the size of the generated script, but allows you
diff --git a/tests/runner.py b/tests/runner.py
index 8610fd0b..8cd28d67 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2169,6 +2169,8 @@ if 'benchmark' not in str(sys.argv):
self.do_run(src, '*16,0,4,8,8,12|20,0,4,4,8,12,12,16|24,0,20,0,4,4,8,12,12,16*\n*0,0,0,1,2,64,68,69,72*\n*2*')
def test_runtimelink(self):
+ if Building.LLVM_OPTS: return self.skip('LLVM opts will optimize printf into puts in the parent, and the child will still look for puts')
+
header = r'''
struct point
{
@@ -2212,6 +2214,7 @@ if 'benchmark' not in str(sys.argv):
int main( int argc, const char *argv[] ) {
struct point p = { 54, 2 };
suppFunc(p);
+ printf("ok.\n");
return 0;
}
'''
@@ -2223,7 +2226,7 @@ if 'benchmark' not in str(sys.argv):
Settings.BUILD_AS_SHARED_LIB = 0
Settings.RUNTIME_LINKED_LIBS = ['liblib.so'];
- self.do_run(main, 'supp: 54,2\nmain: 56\nsupp see: 543\n')
+ self.do_run(main, 'supp: 54,2\nmain: 56\nsupp see: 543\nok.')
def test_dlfcn_basic(self):
lib_src = '''