[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

Alan Zhao via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 13:34:43 PST 2024


alanzhao1 wrote:

Here's what I did to repro:

`include.cc`:

```cpp
#include <CoreFoundation/CoreFoundation.h>
```

Build clang:
```
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LLD=False -DLLVM_CCACHE_BUILD=True -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" ../llvm
$ ninja clang
```

I get the following error with this patch:
```
$ bin/clang -c -o /dev/null ~/src/tests/include.cc -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/
/Users/ayzhao/src/tests/include.cc:1:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
    1 | #include <CoreFoundation/CoreFoundation.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```


System information:

```
$ xcodebuild -version
Xcode 13.4
Build version 13F17a
$ uname -a
Darwin ayzhao-macbookpro2.roam.internal 23.3.0 Darwin Kernel Version 23.3.0: Thu Jan  4 13:52:35 PST 2024; root:xnu-10002.81.5~13/RELEASE_ARM64_T6000 arm64
```

https://github.com/llvm/llvm-project/pull/75841


More information about the cfe-commits mailing list