swift: use stdenv libc++ on Darwin#245641
Merged
wegank merged 1 commit intoNixOS:masterfrom Aug 5, 2023
Merged
Conversation
Contributor
Author
|
Result of 6 packages marked as broken and skipped:
9 packages failed to build:
36 packages built:
|
Contributor
Author
|
Result of 3 packages marked as broken and skipped:
4 packages failed to build:
18 packages built:
|
Contributor
Author
|
tjni
reviewed
Aug 4, 2023
Comment on lines
32
to
46
Contributor
There was a problem hiding this comment.
Now that llvmPackages_15 is repeated twice, can we turn this into a function, something like:
if pkgs.stdenv.isDarwin then
# Comments here
let makeSwiftClang = stdenvLLVM: targetLLVM:
...
in
makeSwiftClang pkgs.llvmPackages llvmPackages_15
Contributor
Author
There was a problem hiding this comment.
How’s the current push look like with the alias (swiftLlvmPackages)? I can still rework it to use a function, but it’s only going to be used right away, so it seems like it would add a limited amount of clarity.
3c58bda to
3595e01
Compare
3595e01 to
8b124ad
Compare
Swift uses libc++ 15, but it should really be using the same libc++ from the stdenv. While not strictly needed currently, Swift 5.9 will support C++ interop. If Swift is not using the stdenv C++, any C++ library used with interop would need to be rebuilt against the Swift libc++.
8b124ad to
efdf4e9
Compare
tjni
approved these changes
Aug 5, 2023
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.
Description of changes
Swift uses libc++ 15, but it should really be using the same libc++ from the stdenv. While not strictly needed currently, Swift 5.9 will support C++ interop. If Swift is not using the stdenv C++, any C++ library used with interop would need to be rebuilt against the Swift libc++.
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/)