Commit 0fc3659
authored
Merge pull request #65795 from apple/maxd/fix-missing-cmake-value
CMake: fix missing `SWIFT_CONCURRENCY_GLOBAL_EXECUTOR` value
`SWIFT_CONCURRENCY_GLOBAL_EXECUTOR` is defined in `stdlib/cmake/modules/StdlibOptions.cmake`, which is not included during the first pass of evaluation of the root `CMakeLists.txt`. It is available on subsequent evaluations after the value is stored in CMake cache. This led to subtle bugs, where `usr/lib/swift_static/linux/static-stdlib-args.lnk` didn't contain certain flags on clean toolchain builds, but did contain them in incremental builds.
Not having these autolinking flags in toolchain builds leads to errors when statically linking executables on Linux.
Additionally, since are trivial tests previously didn't link Dispatch statically, the didn't expose a bug where `%import-static-libdispatch` substitution had a missing value. To fix that I had to update `lit.cfg` and clean up some of the related path computations to infer a correct substitution value.
Resolves some of the errors reported in #65097.File tree
6 files changed
+26
-23
lines changed- stdlib/cmake/modules
- test
- Driver
- utils
6 files changed
+26
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | 694 | | |
702 | 695 | | |
703 | 696 | | |
| |||
706 | 699 | | |
707 | 700 | | |
708 | 701 | | |
709 | | - | |
| 702 | + | |
710 | 703 | | |
711 | | - | |
| 704 | + | |
712 | 705 | | |
713 | 706 | | |
714 | 707 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1613 | 1613 | | |
1614 | 1614 | | |
1615 | 1615 | | |
1616 | | - | |
1617 | | - | |
| 1616 | + | |
1618 | 1617 | | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
| 1618 | + | |
| 1619 | + | |
1622 | 1620 | | |
1623 | 1621 | | |
1624 | | - | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
| 1622 | + | |
1629 | 1623 | | |
1630 | 1624 | | |
1631 | 1625 | | |
| |||
2669 | 2663 | | |
2670 | 2664 | | |
2671 | 2665 | | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
2672 | 2670 | | |
2673 | 2671 | | |
2674 | 2672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1901 | 1901 | | |
1902 | 1902 | | |
1903 | 1903 | | |
1904 | | - | |
| 1904 | + | |
1905 | 1905 | | |
1906 | 1906 | | |
1907 | 1907 | | |
| |||
0 commit comments