aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-19 13:54:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-19 13:54:43 -0800
commitfca29f7958688e613801f4f13c784796f1270bad (patch)
treedcdc2461d3ec76ad5c74e0752896b1746b88ae0f /tools/shared.py
parent1327ff5cbb6f0c433b64f713dd95acb0f09a669f (diff)
tolerate people issuing link commands with duplicates in them
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index fdcdbbda..0a041669 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -790,6 +790,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
seen_symbols = seen_symbols.union(symbols.defs)
# Finish link
+ actual_files = list(set(actual_files)) # tolerate people trying to link a.so a.so etc.
if DEBUG: print >>sys.stderr, 'emcc: llvm-linking:', actual_files
output = Popen([LLVM_LINK] + actual_files + ['-o', target], stdout=PIPE).communicate()[0]
assert os.path.exists(target) and (output is None or 'Could not open input file' not in output), 'Linking error: ' + output + '\nemcc: If you get duplicate symbol errors, try --remove-duplicates'