mhinz added a comment. I applied the fix to all toolchains now, but I'm unsure how to write a test for it. Neither could I find tests for similar options like `-DDEFAULT_SYSROOT`.
My use case: I want to build a clang that has the same search path as the clang shipped with macOS. $ /usr/bin/clang -E -xc -v /dev/null [snip] #include <...> search starts here: /usr/local/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) End of search list. [snip] For this, I need to pass this to cmake: -DC_INCLUDE_DIRS="/usr/local/include:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include" -DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)" CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69221/new/ https://reviews.llvm.org/D69221 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits