-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mac Build] Add stdlib build #843
base: main
Are you sure you want to change the base?
Conversation
Steelskin
commented
Nov 7, 2024
•
edited
Loading
edited
- Adapt stdlib job to build for both Windows and Mac.
e744c95
to
5a2d842
Compare
f5f0bd7
to
cee6e49
Compare
5a2d842
to
6ea346c
Compare
93fad08
to
d65f3fa
Compare
6ea346c
to
fb11672
Compare
34b2bed
to
1d9ced6
Compare
425fe14
to
4643a5a
Compare
4643a5a
to
fe272e4
Compare
fe272e4
to
718402d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we could re-use or try to upstream the cmake caches?
# TODO: Build this on macOS or make an equivalent Mac-only job | ||
if: inputs.build_os == 'Windows' | ||
needs: [compilers, cmark_gfm] | ||
needs: [compilers] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilers will need the CMark GFM to execute, why is the dependency removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it because it is not a direct dependency of the stdlib
job.
- uses: actions/checkout@v4 | ||
if: matrix.os == 'Darwin' | ||
with: | ||
path: ${{ github.workspace }}/SourceCache/swift-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use the explicit revision to checkout at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intend to upstream the cache files before landing this and this will then go away.
$StdlibCxx = "${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/clang++" | ||
$StdlibFlags = "" | ||
$StdlibCacheFile = "${{ github.workspace }}/SourceCache/swift-build/Runtime-${{ matrix.platform }}-${{ matrix.arch }}.cmake" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we push this down into the workflow through the matrix and simplify this somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these to the matrices. It's a bit simpler now.
718402d
to
fb2523c
Compare
22f85d3
to
71128d5
Compare
In the stdlib job, the toolchain is now extracted under `BinaryCache/Library`, rather then under `BuildRoot/Library`. This allows to change the SDK artifact root path to `BuildRoot/Library`, simplifying download in subsequent jobs and making room for the macOS toolchain paths. Extracted from #843
Currently, in the `stdlib` job, the toolchain is extracted to `BuildRoot/Library`, and the Swift Standard Library is also installed to `BuildRoot/Library`. Other jobs typically extract the toolchain to `BinaryCache/Library`. This changes the extraction path to `BinaryCache/Library` in the `stdlib` job, bringing it in-line with the rest of the build. In addition, this changes the Swift Standard Library artifact root to be `BuildRoot/Library`, rather than the full path to the platform SDK, `BuildRoot/Library/Developer/Platforms/${{ matrix.os }}.platform`. This is in preparation for adapting the job to build for macOS, where the Swift Standard Library will be installed under `Library/Toolchains/unknown-Asserts-development.xctoolchain/usr`. Extracted from #843
* Add cache files for the stdlib build * Adapt stdlib job to build for both Windows and Mac.
71128d5
to
116e75d
Compare
"build_cc": "${HostToolchain}/usr/bin/clang-cl.exe", | ||
"build_cxx": "${HostToolchain}/usr/bin/clang-cl.exe", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are confusing. The build C/C++ compilers change between phases.