aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/shared.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index ba1f7dcc..2abda0c9 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -27,10 +27,16 @@ EXEC_LLVM = path_from_root('tools', 'exec_llvm.py')
# Additional compiler options
-COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-nostdinc', '-v', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-U__SSE__', '-U__SSE2__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87'] + [
+USE_EMSDK = True
+
+COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-v', '-U__i386__', '-U__x86_64__', '-U__i386', '-U__x86_64', '-U__SSE__', '-U__SSE2__', '-UX87_DOUBLE_ROUNDING', '-UHAVE_GCC_ASM_FOR_X87']
+
+if USE_EMSDK:
+ COMPILER_OPTS += [ '-nostdinc',
'-I' + path_from_root('system', 'include'),
'-I' + path_from_root('system', 'include', 'libc'),
'-I' + path_from_root('system', 'include', 'libcxx'),
+ '-I' + path_from_root('system', 'include', 'freebsd'), # sys/mman.h
]
# Engine tweaks