aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-07-29 15:16:50 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-07-29 15:16:50 -0700
commitdece1080e837ccddddac1187709cdd669329b1a1 (patch)
treea211bb4a5def584d26d19f52db3aa62846d21924
parent5494a7299bc3d2354dce7c244ae3d01c17ccac61 (diff)
js engine and emmaken fixes
-rw-r--r--settings.py8
-rw-r--r--tests/runner.py2
-rwxr-xr-xtools/emmaken.py18
3 files changed, 15 insertions, 13 deletions
diff --git a/settings.py b/settings.py
index e91d07d2..5079289f 100644
--- a/settings.py
+++ b/settings.py
@@ -13,13 +13,11 @@ COMPILER_OPTS = ['-m32'] # Need to build as 32bit arch, for now -
# various errors on 64bit compilation
# WARNING: '-g' here will generate llvm bitcode that lli will crash on!
-SPIDERMONKEY_ENGINE = [os.path.expanduser('~/Dev/tracemonkey/js/src/js'), '-m', '-j', '-p']
+SPIDERMONKEY_ENGINE = [os.path.expanduser('~/Dev/mozilla-central/js/src/js'), '-m', '-j', '-p']
V8_ENGINE = [os.path.expanduser('~/Dev/v8/d8')]
-# XXX Warning: Compiling the 'cubescript' test in SpiderMonkey can lead to an extreme amount of memory being
-# used, see Mozilla bug 593659. Possibly also some other tests as well.
-#COMPILER_ENGINE=SPIDERMONKEY_ENGINE
-COMPILER_ENGINE=V8_ENGINE
+COMPILER_ENGINE=SPIDERMONKEY_ENGINE
+#COMPILER_ENGINE=V8_ENGINE # XXX Warning: currently appears to be broken on v8 trunk, some arguments issue
JS_ENGINE=V8_ENGINE
diff --git a/tests/runner.py b/tests/runner.py
index 1ea17a63..b791be79 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2362,7 +2362,7 @@ if 'benchmark' not in sys.argv:
lambda: map(ord, open(path_from_root('tests', 'poppler', 'ref.ppm'), 'r').read()).__str__().replace(' ', ''),
args='-scale-to 512 paper.pdf filename'.split(' '),
post_build=post,
- js_engines=[SPIDERMONKEY_ENGINE]) # V8 bug 1257
+ js_engines=[V8_ENGINE]) # XXX Moz bug 675269
#, build_ll_hook=self.do_autodebug)
def test_openjpeg(self):
diff --git a/tools/emmaken.py b/tools/emmaken.py
index dea8194e..038e0c09 100755
--- a/tools/emmaken.py
+++ b/tools/emmaken.py
@@ -87,8 +87,8 @@ try:
CC_ARG_SKIP = ['-O1', '-O2', '-O3']
CC_ADDITIONAL_ARGS = ['-m32', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-U__SSE__', '-U__SSE2__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87']
ALLOWED_LINK_ARGS = ['-f', '-help', '-o', '-print-after', '-print-after-all', '-print-before',
- '-print-before-all', '-time-passes', '-v', '-verify-dom-info', '-version' ]
- DISALLOWED_LINK_ARGS = []#['rc']
+ '-print-before-all', '-time-passes', '-v', '-verify-dom-info', '-version' ]
+ TWO_PART_DISALLOWED_LINK_ARGS = ['-L'] # Ignore thingsl like |-L .|
EMMAKEN_CFLAGS = os.environ.get('EMMAKEN_CFLAGS')
if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += EMMAKEN_CFLAGS.split(' ')
@@ -125,7 +125,7 @@ try:
if '--version' in opts:
use_linker = False
- if set(sys.argv[1]).issubset(set('cru')): # ar
+ if set(sys.argv[1]).issubset(set('cruqs')): # ar
sys.argv = sys.argv[:1] + sys.argv[3:] + ['-o='+sys.argv[2]]
assert use_linker, 'Linker should be used in this case'
@@ -133,7 +133,10 @@ try:
call = LLVM_LINK
newargs = []
found_o = False
- for arg in sys.argv[1:]:
+ i = 0
+ while i < len(sys.argv)-1:
+ i += 1
+ arg = sys.argv[i]
if found_o:
newargs.append('-o=%s' % arg)
found_o = False
@@ -145,12 +148,13 @@ try:
prefix = arg.split('=')[0]
if prefix in ALLOWED_LINK_ARGS:
newargs.append(arg)
+ if arg in TWO_PART_DISALLOWED_LINK_ARGS:
+ i += 1
elif arg.endswith('.so'):
continue # .so's do not exist yet, in many cases
else:
# not option, so just append
- if arg not in DISALLOWED_LINK_ARGS:
- newargs.append(arg)
+ newargs.append(arg)
elif not header:
call = CXX if use_cxx else CC
newargs = [ arg for arg in sys.argv[1:] if arg not in CC_ARG_SKIP ] + CC_ADDITIONAL_ARGS
@@ -170,6 +174,6 @@ try:
os.execvp(call, [call] + newargs)
except Exception, e:
- print 'Error in emmaken.py. Is the config file ~/.emscripten set up properly?', e
+ print 'Error in emmaken.py. (Is the config file ~/.emscripten set up properly?) Error:', e
raise