swift: update for cc-wrapper changes#250296
Merged
vcunat merged 1 commit intoNixOS:staging-nextfrom Aug 20, 2023
Merged
Conversation
The Swift compiler derivation modifies the clang wrapper to use `exec -a "$0"` to allow it to use the same binary for both `clang` and `clang++`. The sed script it uses to do this fails after the cc-wrapper changes in 6f2b3ba were merged. This is fixed by updating `makeClangWrapper` to work with the cc-wrapper changes by having Bash invoke a simple script that uses `exec -a "$0"` to set the required name for clang. This fixes the staging-next build failures with Swift on Darwin and Linux. NixOS#248496 (comment)
Member
|
@ofborg build swift |
Member
|
I locally checked building |
Member
|
Oh yeah, and I almost forgot that I tried this out on Hydra already :-D |
stephank
approved these changes
Aug 20, 2023
Contributor
stephank
left a comment
There was a problem hiding this comment.
Darn, I hadn't considered that could cause the failure. Thanks for figuring this out, must've been annoying!
It's unfortunate that it's not obvious when this fails, and how easy it is to break. It doesn't look like sed let's you verify the amount of matches/replacements? Maybe we can cheese it with a simple check over diff output using diff ... | wc -l? (Probably a separate PR.)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Swift compiler derivation modifies the clang wrapper to use
exec -a "$0"to allow it to use the same binary for bothclangandclang++. The sed script it uses to do this fails after the cc-wrapper changes in 6f2b3ba were merged.This is fixed by updating
makeClangWrapperto work with the cc-wrapper changes by having Bash invoke a simple script that usesexec -a "$0"to set the required name for clang.This fixes the staging-next build failures with Swift on Darwin and Linux.
#248496 (comment)
Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)