-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
clang_15: fix build!=(host==target) cross compilation #226551
Conversation
ofborg build pkgsCross.aarch64-multiplatform.clang_15 |
(I think we have to actually @ ofborg; trying again) @ofborg build pkgsCross.aarch64-multiplatform.clang_15 |
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.
Thanks for this PR! I definitely dropped the ball on making sure we didn't break cross in #194634.
This looks good; I left some notes with minor nits.
Could you also apply these changes to llvmPackages_git
? I believe the llvmPackages_git
version on master
is just slightly too old to pick up llvm/llvm-project@18b4a8b so clang-tidy-confusable-chars-gen
won't exist and the build will fail but it's fine; we're bumping llvmPackages_git
to 15.0.7 shortly: #222894.
I believe I've taken care of them; if not let me know.
Done: b789673fb9d62d1fe86d9ea49dc492ff24c65256 Next force-push will be a squash.
Not at all! We have almost no ofborg/hydra coverage for |
Looks good, thank you! I think this may have to target |
I believe indeed it should target staging. |
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.
Thanks! I partially had the same fix (without the -Wno-maybe-uninitialized) in a local branch, but was waiting for LLVM 15 and git to be sufficiently in sync before I PRed it. (It's actually what spawned that whole effort.)
Should go to staging though, as others have pointed out.
@RaitoBezarius maybe we should merge #222894 first, so we don't forget to add the missing program once it's bumped? Is it waiting for anything? |
I believe #222894 is ready; I think we just needed to confirm that the ofborg failures on that PR are spurious. Not sure I follow re: the missing program; IIUC this PR updates |
AFAIK we should proceed with the merge of the PR you are mentioning, I was waiting for your final validations. |
clang_15 appears to not cross compile in the build!=(host==target) case due to two problems, which this commit fixes: - It trips -Wmaybe-uninitialized on recent gcc, but only in the build!=host case (likely due to #ifdefs) - Two more buildPlatform tools have been added: clang-tidy-confusable-chars-gen and clang-pseudo-gen Co-authored-by: Rahul Butani <[email protected]>
Done. |
@ofborg build pkgsCross.powernv.clang |
@@ -36,9 +36,14 @@ let | |||
"-DSPHINX_OUTPUT_MAN=ON" | |||
"-DSPHINX_OUTPUT_HTML=OFF" | |||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" | |||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ | |||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [ |
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.
Broke pkgsCross.musl64.llvmPackages_16.clang.cc
and (presumably, not built) pkgsStatic.llvmPackages_16.clang.cc
(15 too)
> cd /build/clang-src-16.0.6/clang/build && clang-tblgen -gen-clang-diags-defs -clang-component=Serialization -I /build/clang-src-16.0.6/clang/include/clang/Basic -I/build/clang-src-16.0.6/clang/include -I/build/clang-src-16.0.6/clang/build/include -I/nix/store/0jp04rmkq2b25qqar9y6nm0z3dzmziib-llvm-x86_64-unknown-linux-musl-16.0.6-dev/include /build/clang-src-16.0.6/clang/include/clang/Basic/Diagnostic.td --write-if-changed -o include/clang/Basic/DiagnosticSerializationKinds.inc -d include/clang/Basic/DiagnosticSerializationKinds.inc.d
> /bin/sh: clang-tblgen: not found
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.
Description of changes
clang_15 appears to not cross compile in the build!=(host==target) case due to two problems, which this commit fixes:
It trips -Wmaybe-uninitialized on recent gcc, but only in the build!=host case (likely due to #ifdefs)
Two more buildPlatform tools have been added: clang-tidy-confusable-chars-gen and clang-pseudo-gen
Things done
sandbox = true
set 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/
)