aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 5 insertions, 2 deletions
diff --git a/emcc b/emcc
index b8e2489c..fa18968a 100755
--- a/emcc
+++ b/emcc
@@ -239,7 +239,7 @@ if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += EMMAKEN_CFLAGS.split(' ')
# ---------------- Utilities ---------------
SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc')
-BITCODE_SUFFIXES = ('.bc', '.o', '.a', '.dylib', '.so', '.dll')
+BITCODE_SUFFIXES = ('.bc', '.o', '.dylib', '.so', '.dll')
ASSEMBLY_SUFFIXES = ('.ll',)
def unsuffixed(name):
@@ -377,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 + ASSEMBLY_SUFFIXES): # we already removed -o <target>, so all these should be inputs
+ if arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + ASSEMBLY_SUFFIXES) or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
newargs[i] = ''
if os.path.exists(arg):
if arg.endswith(SOURCE_SUFFIXES):
@@ -440,6 +440,9 @@ try:
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'))
+ elif shared.Building.is_ar(input_file):
+ if DEBUG: print >> sys.stderr, 'emcc: copying ar file: ', input_file
+ shutil.copyfile(input_file, in_temp(os.path.basename(input_file)))
else: #.ll
if not LEAVE_INPUTS_RAW:
# Note that by assembling the .ll file, then disassembling it later, we will