Skip to content

Commit 6b8e497

Browse files
theunidongcarl
authored andcommitted
depends: specify libc++ header location for darwin
For depends builds this was fixed by fbcfcf6, which deleted the conflicting headers. When we no longer control the clang installation, we need to ensure that the SDK's libc++ headers are used rather than the ones shipped with clang. We can do that by turning off the default include path and hard-coding our own. This hard-coded path is ok because we control (via SDK packaging) where these headers end-up. Side-note: Now that this path is hard-coded in depends, we can potentially package the SDK differently, as the c++ folder can live wherever is most convenient for us.
1 parent 156b604 commit 6b8e497

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

depends/hosts/darwin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-
99
# When cross-compiling for Darwin using Clang, -mlinker-version must be passed to
1010
# ensure that modern linker features are enabled.
1111
darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
12-
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin
12+
darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK) -stdlib=libc++ -mlinker-version=$(LD64_VERSION) -B$(build_prefix)/bin -nostdinc++ -isystem $(OSX_SDK)/usr/include/c++/v1
1313

1414
darwin_CFLAGS=-pipe
1515
darwin_CXXFLAGS=$(darwin_CFLAGS)

0 commit comments

Comments
 (0)