Permalink
Browse files

js engine and emmaken fixes

  • Loading branch information...
1 parent 5494a72 commit dece1080e837ccddddac1187709cdd669329b1a1 @kripken kripken committed Jul 29, 2011
Showing with 15 additions and 13 deletions.
  1. +3 −5 settings.py
  2. +1 −1 tests/runner.py
  3. +11 −7 tools/emmaken.py
View
@@ -13,13 +13,11 @@
# 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
View
@@ -2362,7 +2362,7 @@ def post(filename):
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):
View
@@ -87,8 +87,8 @@ def path_from_root(*pathelems):
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,15 +125,18 @@ def path_from_root(*pathelems):
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'
if use_linker:
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 @@ def path_from_root(*pathelems):
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 @@ def path_from_root(*pathelems):
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

0 comments on commit dece108

Please sign in to comment.