Skip to content

Commit 0a94b3f

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge bitcoin#27328: depends: fix osx build with clang 16
87afcb0 depends: fix osx build with clang 16 (Cory Fields) Pull request description: Current build (using forced system clang as a test) results in: > error: unknown argument: '-internal-externc-isystem/opt/clang+llvm-16.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/clang/16/include' For some reason the previous syntax worked with clang 15 and below, but clang 16 requires that the option and value are properly separated. See [here for an example of upstream using this syntax](https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/crash-report-with-asserts.c#L9). There is no change in behavior for previous versions. I'm seeing an additional unrelated problem with linking with system clang, but I'll PR the solution to that separately as it's not as straightforward as this. ACKs for top commit: TheCharlatan: ACK 87afcb0 hebasto: ACK 87afcb0 Tree-SHA512: 127037c888c37c6ccd9679e96da34037cc43ccdc07915865a0a5494edb62633e83fc1bd6b1c4bb7a0322f5b59622e10090a31987f38496fb6b306488e9941594
1 parent d494339 commit 0a94b3f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

depends/hosts/darwin.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ darwin_CC=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
9999
$(clang_prog) --target=$(host) -mmacosx-version-min=$(OSX_MIN_VERSION) \
100100
-B$(build_prefix)/bin -mlinker-version=$(LD64_VERSION) \
101101
-isysroot$(OSX_SDK) \
102-
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
103-
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
102+
-Xclang -internal-externc-isystem -Xclang $(clang_resource_dir)/include \
103+
-Xclang -internal-externc-isystem -Xclang $(OSX_SDK)/usr/include
104104
darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
105105
-u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH \
106106
-u LIBRARY_PATH \
@@ -109,8 +109,8 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
109109
-isysroot$(OSX_SDK) \
110110
-stdlib=libc++ \
111111
-stdlib++-isystem$(OSX_SDK)/usr/include/c++/v1 \
112-
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
113-
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
112+
-Xclang -internal-externc-isystem -Xclang $(clang_resource_dir)/include \
113+
-Xclang -internal-externc-isystem -Xclang $(OSX_SDK)/usr/include
114114

115115
darwin_CFLAGS=-pipe
116116

0 commit comments

Comments
 (0)