Repository navigation
Enable sccache for macOS CoreCLR legs #128675
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4ea4000
Enable sccache as compiler launcher in build-commons (with macOS -Xar…
steveisok 8c3499b
Enable sccache for osx_arm64 CI legs
steveisok da190c5
Enable sccache for osx_x64 CoreCLR_Libraries leg
steveisok 8be4c69
Expand sccache to remaining applicable macOS CI legs
steveisok f891935
Merge branch 'main' into mac-sccache-ci
steveisok f15f385
Merge branch 'main' into mac-sccache-ci
agocke 1e45d96
Use NuGet sccache package for macOS CI
agocke 98655bb
Simplify macOS sccache package download
agocke b9ec757
Use architecture-specific macOS sccache packages
agocke a775dce
Merge branch 'main' into mac-sccache-ci
agocke 76cd046
Merge branch 'main' into mac-sccache-ci
agocke 0593291
Merge branch 'main' into mac-sccache-ci
agocke ecc84ff
Preserve macOS PCH use with sccache
agocke 3e8821c
Avoid caching macOS PCH generation
agocke 3d4836e
Merge upstream/main into mac-sccache-ci
agocke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| #!/usr/bin/env bash | ||
| # Wrapper around sccache for macOS builds. | ||
| # sccache cannot parse -Xarch_<arch> flags that CMake generates for PCH | ||
| # includes. Rewrite them to explicit Clang frontend options that preserve | ||
| # use of the generated PCH while remaining parseable by sccache. | ||
|
|
||
| for arg in "$@"; do | ||
| if [[ "$arg" == "-emit-pch" ]]; then | ||
| exec "$@" | ||
| fi | ||
| done | ||
|
|
||
| args=() | ||
| skip_xarch=false | ||
|
|
||
| for arg in "$@"; do | ||
| if $skip_xarch; then | ||
| skip_xarch=false | ||
| if [[ "$arg" == -include?* ]]; then | ||
| local_path="${arg#-include}" | ||
| args+=( | ||
| "-Xclang" "-include-pch" "-Xclang" "${local_path}.pch" | ||
| "-Xclang" "-include" "-Xclang" "$local_path" | ||
| ) | ||
| else | ||
| args+=("$arg") | ||
| fi | ||
| continue | ||
| fi | ||
| if [[ "$arg" == -Xarch_* ]]; then | ||
| skip_xarch=true | ||
| continue | ||
| fi | ||
| args+=("$arg") | ||
| done | ||
|
|
||
| exec sccache "${args[@]}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.