diff options
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/shared.py b/tools/shared.py index 2b3ac951..12490cdf 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -147,14 +147,16 @@ COMPILER_OPTS = COMPILER_OPTS + ['-m32', '-U__i386__', '-U__x86_64__', '-U__i386 USE_EMSDK = not os.environ.get('EMMAKEN_NO_SDK') if USE_EMSDK: - EMSDK_OPTS = [ '-nostdinc', - '-I' + path_from_root('system', 'include'), - '-I' + path_from_root('system', 'include', 'bsd'), # posix stuff - '-I' + path_from_root('system', 'include', 'libc'), - '-I' + path_from_root('system', 'include', 'libcxx'), - '-I' + path_from_root('system', 'include', 'gfx'), - '-I' + path_from_root('system', 'include', 'net'), - '-I' + path_from_root('system', 'include', 'SDL'), + # Disable system C and C++ include directories, and add our own (using -idirafter so they are last, like system dirs, which + # allows projects to override them) + EMSDK_OPTS = [ '-nostdinc', '-nostdinc++', + '-idirafter' + path_from_root('system', 'include'), + '-idirafter' + path_from_root('system', 'include', 'bsd'), # posix stuff + '-idirafter' + path_from_root('system', 'include', 'libc'), + '-idirafter' + path_from_root('system', 'include', 'libcxx'), + '-idirafter' + path_from_root('system', 'include', 'gfx'), + '-idirafter' + path_from_root('system', 'include', 'net'), + '-idirafter' + path_from_root('system', 'include', 'SDL'), ] + [ '-U__APPLE__' ] |