aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-17 17:06:49 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-17 17:06:49 -0700
commit02382e49cb9ec756b1b50f350c956d82411a1c67 (patch)
tree958f2b93738ee436f7f462fc4a399db523177dc8 /emcc
parenta16f6f5f88cc3a94ecac720ffa01ccf2a4750a62 (diff)
parentf06dfed6a60d67360fb2daca0d4bbe02caa0149c (diff)
Merge pull request #1280 from juj/abs_path_check
Improve absolute path warning detection to work on Windows, and make the...
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 4 insertions, 3 deletions
diff --git a/emcc b/emcc
index 9849e881..36ee9ba0 100755
--- a/emcc
+++ b/emcc
@@ -855,9 +855,10 @@ try:
memory_init_file = int(newargs[i+1])
newargs[i] = ''
newargs[i+1] = ''
- elif newargs[i].startswith(('-I/', '-L/')):
- if not absolute_warning_shown:
- logging.warning ('-I or -L of an absolute path encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not
+ elif newargs[i].startswith(('-I', '-L')):
+ path_name = newargs[i][2:]
+ if not absolute_warning_shown and os.path.isabs(path_name):
+ logging.warning ('-I or -L of an absolute path "' + newargs[i] + '" encountered. If this is to a local system header/library, it may cause problems (local system files make sense for compiling natively on your system, but not necessarily to JavaScript)') # Of course an absolute path to a non-system-specific library or header is fine, and you can ignore this warning. The danger are system headers that are e.g. x86 specific and nonportable. The emscripten bundled headers are modified to be portable, local system ones are generally not
absolute_warning_shown = True
newargs = [ arg for arg in newargs if arg is not '' ]