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
llvm: init 5.0 #29541
llvm: init 5.0 #29541
Conversation
If the default version was 4 before, it probably makes sense to change it to 5. Not really any backwards-incompatible things happened, except with internal C++ API stuff. |
The darwin stdenv uses clang we should do some testing with a clang-5 stdenv before switching the default. Also I'm not sure if it's ideal to switch the default right after a new release since it potentially makes backporting more difficult. |
''; | ||
|
||
preCheck = '' | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib |
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.
Doing this in preBuild
was not possible?
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.
I'm not sure, would that be preferable? (why?)
(this doesn't make it right, but FWIW this is what's done for LLVM 4 currently so probably applies there as well)
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.
Because there is a symlink to $out/lib
added and removed.
@@ -333,6 +333,21 @@ int main(int argc, char **argv) { | ||
ActiveIncludeOption = "-I" + ActiveIncludeDir; | ||
} | ||
|
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.
Btw is the output of llvm-config
sane in this release? (Shows shared library correctly etc).
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.
I gc'd my local build of this, whoops, so after that finishes I'll poke at it and check it looks reasonable when compared against the output given by LLVM 4's llvm-config.
If there's anything in particular you'd like to confirm works, LMK.
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.
This pointed to static libraries in older unpatched versions:
$ llvm-config --libfiles
/nix/store/7sa6x0qzqxnxlf9jy2vih66yzy12sja4-llvm-4.0.1-lib/lib/libLLVM-4.0.so
I agree that this should be mostly a smooth transition, but I'd still slightly prefer changing the default as a separate PR. One reason is that I'm hoping to get this into 17.09 😇, and I expect that will be much less likely if the version is changed as well.. since the switch will likely be a separate commit this is mostly a matter of timing, since vetting the switch on Darwin understandably requires a fair amount of testing. Mostly I'm just thinking that fallout from switching might be its own set of problems separate from the proper packaging of LLVM 5 and so deserves its own PR as logically distinct. On the other hand, switching the default is a good way to test that things work reasonably-ish, Anyway, lots of words to say: shrug! My opinion on this is a bit fickle, LMK if folks have preferences on the matter :). |
I think you're saying changing the default for users of clang/libc++ is likely not problematic? If so then I agree with your reasoning. Users of the C++ API however are likely to break, although AFAIK the changes there are somewhat minor conceptually but still require attention. IIRC the same version is used for both of these use cases so changing it impacts both types of users, although of course this could be routed around should that be useful. |
So what you're saying is we should switch the default /before/ the release, right?! 😁 (or backport the change once it's made) |
Users of the C++ API (myself being one of them) should lock in to a specific major version. That said, I agree with your synopsis above about getting into 17.09. |
Looks like something in the llvm build is trying to codesign on darwin.
@dtzWill I don't have a problem with switching to clang-5 for 17.09 if everything looks ok, but the release managers should probably decide on that. Either way I can push a clang-5 stdenv to my wip jobset to see what breaks. |
Pushed a commit that hopefully patches out that behavior, please let me know if this fixes the problem. |
@dtzWill The darwin build looks good now. |
@dtzWill can you squash this |
Sure thing. Rebuilding after squash+rebase to ensure all is well, will
push in a bit.
…On Tue, Sep 26, 2017 at 4:14 PM, Daiderd Jordan ***@***.***> wrote:
@dtzWill <https://github.com/dtzwill> can you squash this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29541 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAx4sjHpE16j360uhmLjhQxXUchCE2FDks5smWlKgaJpZM4PbepQ>
.
|
91e2870
to
fb7ebf3
Compare
(ready to go, I think! 😁) |
}: | ||
|
||
let | ||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; |
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.
Just noticed this, cc.cc.gcc
doesn't exist on other cc wrappers. Since it's only referenced on linux I think it's better to just inline it.
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" | ||
] | ||
# Maybe with compiler-rt this won't be needed? | ||
++ stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}" |
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.
using stdenv.cc.isGNU
might be a little more correct here.
Sorry for the delay, thanks for the comments. I believe the expression is done this way to handle the case on Linux where clang is used to build clang: it still needs access to "some" gcc for glibc/stdlibc++ (wrapper probably handles this) but also for the support libraries like I'm not sure if the cc-wrapper is able to reasonably guide clang to those resources, and if it can it might be nice to have the paths given reasonable default values for when using If there's a clear solution--or a motivated party to sort this out-- I'm all for the change, but otherwise perhaps it's okay as-is 😇 |
To clarify, I'm just talking about inlining the gcc variable since the else case is wrong and never used. |
It's used when using clang to build clang, see |
Ah! In that case the gcc attribute would exist, still kind of confusing but let's just keep it for now then. |
Definitely still kinda confusing, haha agreed :/. |
Motivation for this change
New stable LLVM!
This does not change the default version anywhere, just makes the new version available.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)This should (and will be) squashed, postponing that until testing sorts out things like Darwin fixes that will require re-squashing anyway.