Skip to content

Commit

Permalink
add -nobuiltininc flag on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 29, 2018
1 parent 63d6d73 commit fbdac6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def select_llvm_c_toolchain(platform, native_toolchain):
exe_filename=provided_clang.exe_filename,
runtime_library_dirs=(provided_clang.runtime_library_dirs + xcode_clang.runtime_library_dirs),
include_dirs=(provided_clang.include_dirs + xcode_clang.include_dirs),
extra_args=(llvm_c_compiler_args + xcode_clang.extra_args))
extra_args=(llvm_c_compiler_args + xcode_clang.extra_args + ['-nobuiltininc']))
else:
gcc_install = yield Get(GCCInstallLocationForLLVM, GCC, native_toolchain._gcc)
provided_gcc = yield Get(CCompiler, GCC, native_toolchain._gcc)
Expand Down Expand Up @@ -375,7 +375,7 @@ def select_llvm_cpp_toolchain(platform, native_toolchain):
include_dirs=(provided_clangpp.include_dirs + xcode_clang.include_dirs),
# On OSX, this uses the libc++ (LLVM) C++ standard library implementation. This is
# feature-complete for OSX, but not for Linux (see https://libcxx.llvm.org/ for more info).
extra_args=(llvm_cpp_compiler_args + xcode_clang.extra_args))
extra_args=(llvm_cpp_compiler_args + xcode_clang.extra_args + ['-nobuiltininc']))
linking_library_dirs = []
linker_extra_args = []
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ def as_environment(self):
# FIXME: distutils will use CFLAGS to populate LDFLAGS and CXXFLAGS as well if specified --
# this probably requires a workaround as discused in #5661.
ret['CFLAGS'] = safe_shlex_join(plat.resolve_platform_specific({
'darwin': lambda: [MIN_OSX_VERSION_ARG],
'linux': lambda: [],
'darwin': lambda: [MIN_OSX_VERSION_ARG, '-nobuiltininc', '-nostdinc', '-nostdinc++'],
'linux': lambda: ['-nostdinc', '-nostdinc++'],
}))
# ret['CFLAGS'] = safe_shlex_join(c_compiler.extra_args)
# ret['CXXFLAGS'] = safe_shlex_join(cpp_compiler.extra_args)
Expand Down

0 comments on commit fbdac6e

Please sign in to comment.