Skip to content
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-cl toolchain for x86 (32-bit) binaries is missing #358

Open
yukawa opened this issue Feb 9, 2025 · 0 comments · May be fixed by #360
Open

clang-cl toolchain for x86 (32-bit) binaries is missing #358

yukawa opened this issue Feb 9, 2025 · 0 comments · May be fixed by #360

Comments

@yukawa
Copy link

yukawa commented Feb 9, 2025

Description of the problem:

As the protobuf team is planning to stop supporting the combination of Bazel and cl.exe and start recommending clang-cl.exe as the alternative, our project (https://github.com/google/mozc) is reviewing what are potential brokers when migrating from cl.exe to clang-cl.exe.

One thing I noticed is that rules_cc as of 0.0.17 doesn't look to offer a clang-cl toolchain to build x86 (32-bit) binaries.

# Hardcoded toolchain, legacy behaviour.
cc_toolchain_suite(
name = "toolchain",
toolchains = {
"armeabi-v7a|compiler": ":cc-compiler-armeabi-v7a",
"x64_windows|msvc-cl": ":cc-compiler-x64_windows",
"x64_x86_windows|msvc-cl": ":cc-compiler-x64_x86_windows",
"x64_arm_windows|msvc-cl": ":cc-compiler-x64_arm_windows",
"x64_arm64_windows|msvc-cl": ":cc-compiler-arm64_windows",
"arm64_windows|msvc-cl": ":cc-compiler-arm64_windows",
"x64_windows|msys-gcc": ":cc-compiler-x64_windows_msys",
"x64_x86_windows|msys-gcc": ":cc-compiler-x64_x86_windows_msys",
"x64_windows|mingw-gcc": ":cc-compiler-x64_windows_mingw",
"x64_x86_windows|mingw-gcc": ":cc-compiler-x64_x86_windows_mingw",
"x64_windows|clang-cl": ":cc-compiler-x64_windows-clang-cl",
"x64_windows_msys": ":cc-compiler-x64_windows_msys",
"x64_windows": ":cc-compiler-x64_windows",
"x64_x86_windows": ":cc-compiler-x64_x86_windows",
"x64_arm_windows": ":cc-compiler-x64_arm_windows",
"x64_arm64_windows": ":cc-compiler-arm64_windows",
"arm64_windows": ":cc-compiler-arm64_windows",
"x64_arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl",
"arm64_windows|clang-cl": ":cc-compiler-arm64_windows-clang-cl",
"armeabi-v7a": ":cc-compiler-armeabi-v7a",
},
)

It would be really nice if rules_cc can provide a clang-cl toolchain to build x86 (32-bit) binaries.

yukawa added a commit to yukawa/rules_cc that referenced this issue Feb 11, 2025
Unlike other toolchains defined for Windows, clang-cl toolchain has not
supported x86 (32-bit) executables. This is a big blocker for projects
that consider switching from msvc toolchain to clang-cl.

With this commit rules_cc starts providing clang-cl toolchain to build
x86 executables.

Closes bazelbuild#358.
yukawa added a commit to yukawa/rules_cc that referenced this issue Feb 11, 2025
Unlike other toolchains defined for Windows, clang-cl toolchain has not
supported x86 (32-bit) executables. This can be a hard blocker for
projects that consider switching from msvc toolchain to clang-cl with
supporting x86 executables.

With this commit rules_cc starts providing clang-cl toolchain to build
x86 executables.

Closes bazelbuild#358.
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 a pull request may close this issue.

1 participant