aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-02 13:43:06 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-02 13:58:58 -0800
commitaebbf2a99402eecf7a53786ec355c59b52090beb (patch)
treef5d3829f543ff581ecd3b04f592eb901ad6f0e73
parentbbacca68675f9f2e1a82f7910812397d52c7d3e4 (diff)
fix for handling of suffixes in emcc
-rwxr-xr-xemcc9
-rwxr-xr-xtests/runner.py3
2 files changed, 5 insertions, 7 deletions
diff --git a/emcc b/emcc
index 655e36d0..8a3e2bae 100755
--- a/emcc
+++ b/emcc
@@ -239,7 +239,8 @@ if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += EMMAKEN_CFLAGS.split(' ')
# ---------------- Utilities ---------------
SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc')
-BITCODE_SUFFIXES = ('.bc', '.o', '.ll', '.a', '.dylib')
+BITCODE_SUFFIXES = ('.bc', '.o', '.a', '.dylib')
+ASSEMBLY_SUFFIXES = ('.ll',)
def unsuffixed(name):
return '.'.join(name.split('.')[:-1])
@@ -376,7 +377,7 @@ try:
for i in range(len(newargs)): # find input files XXX this a simple heuristic. we should really analyze based on a full understanding of gcc params,
# right now we just assume that what is left contains no more |-x OPT| things
arg = newargs[i]
- if arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES): # we already removed -o <target>, so all these should be inputs
+ if arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + ASSEMBLY_SUFFIXES): # we already removed -o <target>, so all these should be inputs
newargs[i] = ''
if os.path.exists(arg):
if arg.endswith(SOURCE_SUFFIXES):
@@ -384,7 +385,7 @@ try:
has_source_inputs = True
else:
# this should be bitcode, make sure it is valid
- if arg.endswith('.ll') or shared.Building.is_bitcode(arg):
+ if arg.endswith(ASSEMBLY_SUFFIXES) or shared.Building.is_bitcode(arg):
input_files.append(arg)
else:
print >> sys.stderr, 'emcc: %s: warning: Not valid LLVM bitcode' % arg
@@ -436,7 +437,7 @@ try:
print >> sys.stderr, 'emcc: compiler frontend failed to generate LLVM bitcode, halting'
sys.exit(1)
else: # bitcode
- if input_file.endswith(('.bc', '.o')):
+ if input_file.endswith(BITCODE_SUFFIXES):
if DEBUG: print >> sys.stderr, 'emcc: copying bitcode file: ', input_file
shutil.copyfile(input_file, in_temp(unsuffixed_basename(input_file) + '.o'))
else: #.ll
diff --git a/tests/runner.py b/tests/runner.py
index 93511589..4c936ed2 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4370,9 +4370,6 @@ def process(filename):
poppler = self.get_library('poppler',
[os.path.join('poppler', '.libs', self.get_shared_library_name('libpoppler.so.13')),
- os.path.join('goo', '.libs', 'libgoo.a'),
- os.path.join('fofi', '.libs', 'libfofi.a'),
- os.path.join('splash', '.libs', 'libsplash.a'),
os.path.join('utils', 'pdftoppm.o'),
os.path.join('utils', 'parseargs.o')],
configure_args=['--disable-libjpeg', '--disable-libpng', '--disable-poppler-qt', '--disable-poppler-qt4', '--disable-cms'])