blob: 8a659d10c8ca68aaaf21c0a0f8b88dfc55c6a7a0 [file] [log] [blame]
--- emcc.py
+++ emcc.py
@@ -206,6 +206,9 @@ class EmccOptions(object):
# Defaults to using the native EOL on each platform (\r\n on Windows, \n on
# Linux & MacOS)
self.output_eol = os.linesep
+ # Whether we will expand the full path of any input files to remove any
+ # symlinks.
+ self.expand_symlinks = True
def use_source_map(options):
@@ -859,7 +862,9 @@ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR P
'-current_version', '-I', '-L', '-include-pch'):
continue # ignore this gcc-style argument
- if os.path.islink(arg) and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS:
+ if (options.expand_symlinks
+ and os.path.islink(arg)
+ and get_file_suffix(os.path.realpath(arg)) in SOURCE_ENDINGS + BITCODE_ENDINGS + DYNAMICLIB_ENDINGS + ASSEMBLY_ENDINGS + HEADER_ENDINGS):
arg = os.path.realpath(arg)
if not arg.startswith('-'):
@@ -2516,6 +2521,8 @@ def parse_args(newargs):
settings_changes.append('SIMD=1')
elif newargs[i] == '-mno-simd128':
settings_changes.append('SIMD=0')
+ elif newargs[i] == '-no-canonical-prefixes':
+ options.expand_symlinks = False
if should_exit:
sys.exit(0)