Skip to content

Conversation

@martin4861
Copy link
Contributor

@martin4861 martin4861 commented Nov 17, 2025

  • Provide clang20 toolchains for graviton2 and graviton3

@martin4861 martin4861 changed the title Extend clang20 Update and extend clang20 Nov 17, 2025
@martin4861 martin4861 marked this pull request as ready for review November 18, 2025 05:56
@martin4861 martin4861 requested a review from a team as a code owner November 18, 2025 05:56
@martin4861 martin4861 requested a review from RReichert November 18, 2025 06:00
@martin4861 martin4861 requested a review from a team as a code owner November 18, 2025 08:38
@martin4861 martin4861 requested review from sbmueller and removed request for a team November 18, 2025 08:38
@martin4861 martin4861 force-pushed the martin4861/extend-clang20 branch from 58b1f79 to 17d66c3 Compare November 18, 2025 09:04
Copy link
Contributor

@RReichert RReichert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've put some general comments, but I'm not a good bazel person, so I leave it to others to have better reviews.


constraint_setting(
name = "toolchain",
default_constraint_value = ":llvm_toolchain",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be a bit scary.

mostly because merging will mean that any repository that upgrades its rules_swiftnav file will automatically get pushed to using the latest compiler, right?

if that is the case, we will need to check in with other teams, namely IOT and Integrity. I would go with the slow transition to using clang-20 with Orion then slowly move down each repository till we get to starling.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. Even though I tested it in many repos, a slower migration is needed due to some requirements, where we need to stick on clang-14 for the moment.

"llvm-cov": "wrappers/llvm-cov",
"llvm-profdata": "wrappers/llvm-profdata",
"ld": "wrappers/ld.ldd",
"ld": "wrappers/ld.ldd", # This should be ld.lld?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ld.lld?

I question if it should be ld.lld since its not the operating system's default linker, but that discussion might lead to other issues, maybe this is okay for now since all the tools are coming from LLVM project

Copy link
Contributor Author

@martin4861 martin4861 Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it should be ld.lld from the llvm project, because ld.ldd could be a typo. I think, that ld is not used, because the toolchain always uses clang for compiling and linking (which then calls the linker). I might revisit this in a follow up PR.

}),
host_system_name = X86_64_LINUX,
target_cpu = "k8",
target_cpu = "k8", # this should be aarch64?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be aarch64?
Would k8 be a placeholder for kubernetes often abbreviated to k8s? This is indeed strange

Copy link
Contributor Author

@martin4861 martin4861 Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming is unfortunate. k8 means amd64, whereas k8s stands for kubernetes. Thats for clang14, it is working as expected currently. Therefore I keep it as it is for now, but maybe I revisit it in a follow up PR.

@martin4861 martin4861 force-pushed the martin4861/extend-clang20 branch from 073acb2 to 5f84cac Compare November 18, 2025 12:09
@martin4861 martin4861 requested a review from RReichert November 19, 2025 05:06
Copy link
Contributor

@reimerix reimerix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With limited knowledge about what we're doing here: LGTM!

@martin4861 martin4861 merged commit b1e6c76 into main Nov 19, 2025
2 checks passed
@martin4861 martin4861 deleted the martin4861/extend-clang20 branch November 19, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants