Commit 96cd8d3
authored
Adds the repository rule xcode_sdk_frameworks (#898)
### What
It scans and configures all SDK frameworks which are required for
explicit module builds.
Specifically, it 1) uses the bazel_tools//tools/osx:xcode_configure.bzl
to fetch all local Xcode infos,
2) finds all frameworks under the xcode SDK path,
and 3) uses the swiftc -scan-dependencies mode to fetch the dependency
graph among all Swift and Clang SDK modules.
We use swift_module_alias to represent a Swift SDK module and
sdk_clang_module for a Clang SDK module.
This PR is based on the previous attempt to support SDK frameworks:
#562
### Test
Runs `bazel build --config=explicit_modules --nobuild
@xcode_sdk_frameworks//...` and inspects the generated repository at
`$(bazel info
output_base)/external/_main~xcode_sdk_frameworks~xcode_sdk_frameworks`.
### Next steps:
The dependency among swift_module_alias and sdk_clang_module doesn't
work yet. We need to fix that.1 parent b13aef1 commit 96cd8d3
5 files changed
Lines changed: 474 additions & 0 deletions
File tree
- rules
- explicit_module
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments