Commit bb7f039
[6.0] Support macros when cross-compiling (#7640)
**Explanation**: Macros cross-compiled by SwiftPM with Swift SDKs should
be correctly built, loaded, and evaluated for the host triple.
**Scope**: isolated to modules dependency resolution and llbuild, does
not impact code related to XCBuild.
**Risk**: medium, known issues were addressed on `main` and are
cherry-picked here, with no new issues reported for a few weeks now.
**Testing**: added unit tests, manual end-to-end testing done with
existing Swift SDKs.
**Issue**: rdar://105991372
**Reviewers**: @bnbarham @xedin @neonichu
(cherry picked from commit cb3b085,
#7353)
```
# Conflicts:
# CHANGELOG.md
# Sources/Build/BuildDescription/SwiftTargetBuildDescription.swift
# Sources/Build/BuildManifest/LLBuildManifestBuilder.swift
# Sources/Build/BuildPlan/BuildPlan.swift
# Sources/Commands/SwiftTestCommand.swift
# Sources/Commands/Utilities/PluginDelegate.swift
# Sources/Commands/Utilities/TestingSupport.swift
# Sources/PackageGraph/ModulesGraph+Loading.swift
# Sources/PackageGraph/ModulesGraph.swift
# Sources/SPMTestSupport/MockBuildTestHelper.swift
# Sources/SPMTestSupport/MockPackageGraphs.swift
# Sources/SPMTestSupport/PackageGraphTester.swift
# Sources/SPMTestSupport/ResolvedTarget+Mock.swift
# Tests/BuildTests/ClangTargetBuildDescriptionTests.swift
# Tests/BuildTests/CrossCompilationBuildPlanTests.swift
# Tests/SourceKitLSPAPITests/SourceKitLSPAPITests.swift
```
(cherry picked from commit b9eb3c1,
#7493)
```
# Conflicts:
# Sources/PackageGraph/ModulesGraph+Loading.swift
# Sources/PackageGraph/Resolution/ResolvedPackage.swift
```
(cherry picked from commit 5a4c024,
#7508)
```
# Conflicts:
# Sources/Commands/SwiftBuildCommand.swift
# Sources/Commands/SwiftTestCommand.swift
# Sources/Commands/Utilities/TestingSupport.swift
```
(cherry picked from commit 8db2401,
#7519)
```
# Conflicts:
# Tests/BuildTests/CrossCompilationBuildPlanTests.swift
```
---------
Co-authored-by: Jonathan Grynspan <[email protected]>
Co-authored-by: Ben Barham <[email protected]>
Co-authored-by: Yuta Saito <[email protected]>
Co-authored-by: Pavel Yaskevich <[email protected]>1 parent 9afe748 commit bb7f039
File tree
66 files changed
+2383
-951
lines changed- Sources
- Basics
- Collections
- Build
- BuildDescription
- BuildManifest
- BuildPlan
- Commands
- PackageCommands
- Snippets/Cards
- Utilities
- CoreCommands
- PackageGraph
- Resolution
- PackageModel/Target
- SPMBuildCore
- BuildParameters
- BuildSystem
- Plugins
- SPMTestSupport
- XCBuildSupport
- swift-bootstrap
- Tests
- BuildTests
- CommandsTests
- FunctionalTests
- PackageGraphPerformanceTests
- PackageGraphTests
- SPMBuildCoreTests
- SourceKitLSPAPITests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
66 files changed
+2383
-951
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
36 | | - | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
Lines changed: 23 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 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 32 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
| |||
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | | - | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
| 136 | + | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
| |||
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
236 | | - | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
245 | | - | |
| 247 | + | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
256 | | - | |
| 258 | + | |
257 | 259 | | |
258 | 260 | | |
259 | | - | |
| 261 | + | |
260 | 262 | | |
261 | 263 | | |
262 | 264 | | |
| |||
269 | 271 | | |
270 | 272 | | |
271 | 273 | | |
| 274 | + | |
272 | 275 | | |
273 | 276 | | |
274 | 277 | | |
| |||
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
281 | | - | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
286 | 289 | | |
287 | | - | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | | - | |
| 298 | + | |
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
| |||
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
335 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
336 | 342 | | |
337 | 343 | | |
338 | 344 | | |
| |||
412 | 418 | | |
413 | 419 | | |
414 | 420 | | |
415 | | - | |
| 421 | + | |
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
419 | | - | |
420 | | - | |
| 425 | + | |
| 426 | + | |
421 | 427 | | |
422 | 428 | | |
423 | | - | |
| 429 | + | |
424 | 430 | | |
425 | 431 | | |
426 | 432 | | |
427 | 433 | | |
428 | | - | |
429 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
430 | 440 | | |
431 | 441 | | |
432 | 442 | | |
| |||
443 | 453 | | |
444 | 454 | | |
445 | 455 | | |
446 | | - | |
| 456 | + | |
447 | 457 | | |
448 | 458 | | |
449 | 459 | | |
| |||
818 | 828 | | |
819 | 829 | | |
820 | 830 | | |
821 | | - | |
| 831 | + | |
822 | 832 | | |
823 | 833 | | |
824 | 834 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments