Skip to content

Commit 51f6198

Browse files
committed
build: unset C{,PLUS}_INCLUDE_PATH to avoid cross-toolchain conflict
macOS cross builds need `C{,PLUS}_INCLUDE_PATH` for Qt's native tooling but causes issues when there are conflicting definitions between the native and cross toolchains
1 parent 84069ae commit 51f6198

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

depends/hosts/darwin.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip")
5151
# Disable adhoc codesigning (for now) when using LLVM tooling, to avoid
5252
# non-determinism issues with the Identifier field.
5353

54-
darwin_CC=$(clang_prog) --target=$(host) \
54+
darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH $(clang_prog) --target=$(host) \
5555
-isysroot$(OSX_SDK) -nostdlibinc \
5656
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks
5757

58-
darwin_CXX=$(clangxx_prog) --target=$(host) \
58+
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH $(clangxx_prog) --target=$(host) \
5959
-isysroot$(OSX_SDK) -nostdlibinc \
6060
-iwithsysroot/usr/include/c++/v1 \
6161
-iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks

0 commit comments

Comments
 (0)