This repository was archived by the owner on Nov 10, 2023. It is now read-only.
Commit 52468c8
Fix incorrect skipping of SDKROOT-rooted frameworks
Summary:
# Context
The Apple platform compiler (clang) and linker (ld64) have a default list of framework search paths. Such search paths should not be included as part of the compiler and linker commands for two reasons:
- It's unnecessary
- It's behaviourally incorrectly when compiling Catalyst apps
As per the [docs](https://www.manpagez.com/man/1/ld64/):
> The default framework search path is `/Library/Frameworks` then `/System/Library/Frameworks`. (Note: previously, `/Network/Library/Frameworks` was at the end of the default path. If you need that functionality, you need to explicitly add `-F/Network/Library/Frameworks`).
> ...
> The `-syslibroot` option will prepend a prefix to all search paths.
# Before
Previously, we would not include **any** framework search path rooted in `$SDKROOT`. That's incorrect because we **only** must skip `$SDKROOT`-rooted frameworks **if** they're part of the default search path as defined by the [docs](https://www.manpagez.com/man/1/ld64/).
# After
We now only skip frameworks which are already part of the default search path. This makes it possible to use the `StoreKitTest` framework located at `$SDKROOT/Developer/Library/Frameworks/StoreKitTest.framework`.
fbshipit-source-id: 9dbde3af4f9e3eb074ef59d6571807b802ca56d21 parent d81a468 commit 52468c8
6 files changed
Lines changed: 63 additions & 2 deletions
File tree
- src/com/facebook/buck
- cxx
- rules/coercer
- swift
- test/com/facebook/buck/apple
- testdata/apple_test_framework_search_path
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
87 | 119 | | |
88 | 120 | | |
89 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | | - | |
| 405 | + | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
212 | 217 | | |
213 | 218 | | |
214 | 219 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments