Preserve the extension of shared libraries as well
This commit is contained in:
Родитель
90dbe68b93
Коммит
fefc3d59b5
9
emcc
9
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', '.dylib', '.so', '.dll')
|
||||
BITCODE_SUFFIXES = ('.bc', '.o')
|
||||
SHAREDLIB_SUFFIXES = ('.dylib', '.so', '.dll')
|
||||
ASSEMBLY_SUFFIXES = ('.ll',)
|
||||
|
||||
def unsuffixed(name):
|
||||
|
@ -377,7 +378,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) or shared.Building.is_ar(arg): # we already removed -o <target>, so all these should be inputs
|
||||
if arg.endswith(SOURCE_SUFFIXES + BITCODE_SUFFIXES + SHAREDLIB_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):
|
||||
|
@ -445,8 +446,8 @@ try:
|
|||
temp_file = in_temp(unsuffixed_basename(input_file) + '.o')
|
||||
shutil.copyfile(input_file, temp_file)
|
||||
temp_files.append(temp_file)
|
||||
elif shared.Building.is_ar(input_file):
|
||||
if DEBUG: print >> sys.stderr, 'emcc: copying ar file: ', input_file
|
||||
elif input_file.endswith(SHAREDLIB_SUFFIXES) or shared.Building.is_ar(input_file):
|
||||
if DEBUG: print >> sys.stderr, 'emcc: copying library file: ', input_file
|
||||
temp_file = in_temp(os.path.basename(input_file))
|
||||
shutil.copyfile(input_file, temp_file)
|
||||
temp_files.append(temp_file)
|
||||
|
|
Загрузка…
Ссылка в новой задаче