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: 4.3.2 -> 5.0.1 #60744
swift: 4.3.2 -> 5.0.1 #60744
Conversation
update Swift * new tweaks to the build process are mostly documented inline * the swiftc wrapper needs the linker path for libicu * some older tweaks could be removed * remove fuzz from patches by updating line numbers * one build fix to libdispatch has been filed upstream
add check phase for running some of the Swift test suite A small number of tests is failing, which needs investigation, so the check phase remains disabled by default.
Awesome, thank you!! This looks great! I can build it and seems to work as expected! I think this can go in as-is-- I'll see about a few details and will make a follow-up PR if they turn out useful/desirable :). |
Oh, I just saw the tests bit. Should this wait for that to be sorted, then? |
@@ -120,6 +120,9 @@ let | |||
builder = '' | |||
# gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found | |||
NIX_CFLAGS_COMPILE="$( echo ${clang.default_cxx_stdlib_compile} ) $NIX_CFLAGS_COMPILE" |
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.
Whhhyyyyyyy
- Do we really not build with clang? 😢
- WTF putting CXXFLAGS in CFLAGS, yikes
- WTF the mix of headers, compilers, runtime libraries-- do we even know what combination is used? Is it consistent throughout the various builds?!
..... And this isn't even something you're adding, so don't worry about it. But... :(. D'oh.
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, this is pretty gnarly. The way I see it, we do indeed use clang, but clang has gcc as a dependency and uses some of its compiler-shipping headers and startup files. The need for these extra flags however is a bit weird for me as well. I tried twice (but just briefly) to get rid of it, because I get bad vibes from it too, but so far failed to diagnose the actual problem. Nix’s clang should be able to find its stuff without help, but somehow it does not.
Well, here's a few tweaks-- what do you think? If you like them feel free to pick them, or just say so and I can do it or make a PR or w/e. Just wanted to share even if this PR isn't merged yet.
|
I would not wait for the tests to work out. These need some extra work and do not appear to be critical. The failures revolve around build problems that appear to be Nix-specific. They did not immediately indicate to me that the resulting swift compiler was broken. Regarding your additional commits:
In summary: I would vote for including all your proposed changes. If you want, I can include those in my pull request and retry the entire build at my end tomorrow. |
The way I see this, the original Nixpkgs repo already builds swift with default clang instead of hardcoding The other two changes check out fine on my end. If you want, I can easily add them to this pull request. |
On Mon, 06 May 2019 14:04:49 +0000 (UTC), Michael Roitzsch ***@***.***> wrote:
The way I see this, the original Nixpkgs repo already builds swift with default clang instead of hardcoding `clang_5`. So there must be something else going on.
Whoops, sorry about that-- probably some local change I forgot :3.
The other two changes check out fine on my end. If you want, I can easily add them to this pull request.
Yes please, thanks!
…
--
You are receiving this because your review was requested.
Reply to this email directly or view it on GitHub:
#60744 (comment) part: text/html
|
I just pushed the additional commits. |
Thank you for all your work on this!! LGTM! |
I updated Swift to version 5.0.1. This needed relatively minor changes, the biggest one is the addition of the
NIX_LDFLAGS_BEFORE
variable to help the internal clang that is being built during the Swift build process.I also updated the patches and added two additional ones. One has been filed as an upstream build issue, so it can be removed once this trickles down. The other causes the Swift build system not to create its own versions of libicu and libc++.
Some older build tweaks could be removed, because they no longer appear to have an effect.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)