aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-08-18 22:05:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-08-18 22:05:23 -0700
commit1f666759fe6170a7be2399e794a4adfa32a82b1e (patch)
tree0aee360758d23229606977e7033bc65a65aa94db /emcc
parent7618310d969295b610805b7240048e7e2a737f36 (diff)
warn on -I and -L to absolute paths, which may be to local system headers/libraries that are not portable
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc2
1 files changed, 2 insertions, 0 deletions
diff --git a/emcc b/emcc
index e78b1416..4df5c39e 100755
--- a/emcc
+++ b/emcc
@@ -516,6 +516,8 @@ try:
elif newargs[i] == '--remove-duplicates':
remove_duplicates = True
newargs[i] = ''
+ elif newargs[i].startswith(('-I/', '-L/')):
+ print >> sys.stderr, 'emcc: 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
newargs = [ arg for arg in newargs if arg is not '' ]
if llvm_opts is None: llvm_opts = LLVM_OPT_LEVEL[opt_level]