blob: 8a659d10c8ca68aaaf21c0a0f8b88dfc55c6a7a0 [file] [log] [blame]
James Kuszmaul27da8142019-07-21 16:13:55 -07001--- emcc.py
2+++ emcc.py
3@@ -206,6 +206,9 @@ class EmccOptions(object):
4 # Defaults to using the native EOL on each platform (\r\n on Windows, \n on
5 # Linux & MacOS)
6 self.output_eol = os.linesep
7+ # Whether we will expand the full path of any input files to remove any
8+ # symlinks.
9+ self.expand_symlinks = True
10
11
12 def use_source_map(options):
13@@ -859,7 +862,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
14 '-current_version', '-I', '-L', '-include-pch'):
15 continue # ignore this gcc-style argument
16
17- if os.path.islink(arg) and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS:
18+ if (options.expand_symlinks
19+ and os.path.islink(arg)
20+ and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS):
21 arg = os.path.realpath(arg)
22
23 if not arg.startswith('-'):
24@@ -2516,6 +2521,8 @@ def parse_args(newargs):
25 settings_changes.append('SIMD=1')
26 elif newargs[i] == '-mno-simd128':
27 settings_changes.append('SIMD=0')
28+ elif newargs[i] == '-no-canonical-prefixes':
29+ options.expand_symlinks = False
30
31 if should_exit:
32 sys.exit(0)
33