bazel-contrib / bazel-contrib/toolchains_llvm

Windows support?

Open
#395 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
371
Forks
283
Avg merge
1d 55m
Merged PRs (30d)
25

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start with the reported external/googletest~/BUILD.bazel location and the generated CppCompile command passed to cl.exe. Compare the Windows toolchain configuration with the Linux setup, then verify that the reported Google Mock compilation completes on Windows without the invalid flag error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.