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
swift: fix cflags for finding C++ headers #94160
Conversation
When you want to build with clang, generally it seems good to use
|
I see, but I think the situation is different here. Swift is largely built by gcc I believe. But while building Swift, its build system also compiles modified versions of LLVM and clang, which it later also runs during the build. For this local clang, these hacks are needed. |
I don't know, but I had checked that it is using clang from nixpkgs in some way, too. EDIT: in particular # However, we want to use the wrapped compiler whenever possible.
export CC="${clang}/bin/clang" |
Yes. I must admit I do not really understand where and how that passed-in clang is used. I have been trying to update to Swift 5.2.4. I have to change things there anyways, so I can try your suggestion as well. |
@vcunat yeah by all accounts the thing is a mess, I just was trying to find the quickest way to keep the mess working, and have things be cleaned up later. |
Should we just merge this, then? |
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.
Yes, why not. Until someone finds a nicer way. I confirm the build gets fixed by this.
As reported in #93919, the
swift
package currently fails to build. This was fallout from f3f7612, which this PR intends to fix.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)