Skip to content

Windows support? #395

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

Open
Zeed-gn opened this issue Sep 23, 2024 · 1 comment
Open

Windows support? #395

Zeed-gn opened this issue Sep 23, 2024 · 1 comment

Comments

@Zeed-gn
Copy link

Zeed-gn commented Sep 23, 2024

I'm using latest commit with git override:

bazel_dep(name = "toolchains_llvm", version = "1.1.2")
git_override(
  module_name = "toolchains_llvm",
  commit = "4ab573b1b87a57791ef2f9ccee71cbad80a2abb9",
  remote = "https://github.com/bazel-contrib/toolchains_llvm",
)

llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
    name = "llvm_toolchain",
    llvm_version = "19.1.0",
)
use_repo(llvm, "llvm_toolchain")
register_toolchains("@llvm_toolchain//:all")

And for some reason:

ERROR: C:/users/user/_bazel_user/df37aufx/external/googletest~/BUILD.bazel:170:11: Compiling googlemock/src/gmock_main.cc failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target @@googletest~//:gtest_main) C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\cl.exe @bazel-out/x64_windows-fastbuild/bin/external/googletest~/_objs/gtest_main/gmock_main.obj.params
cl : Command line error D8021 : invalid numeric argument '/Werror'

Works fine on linux though.

@philwo
Copy link

philwo commented May 11, 2025

I just tried to use this on Windows, but ran into similar issues.

Looks like Windows is not supported (yet?), because both llvm_repo_impl as well as llvm_config_impl just silently produce empty repositories. As far as I understand the code, toolchains_llvm does nothing on Windows, thus llvm.toolchain(...) definitions in the main MODULE.bazel do not have any effect.

There are some Windows LLVM releases defined in the llvm_distributions.bzl, but I don't know how they could be used. Maybe only for cross-compiling from Linux?

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

No branches or pull requests

2 participants