bazel-contrib / toolchains_llvm

LLVM toolchain for bazel
Apache License 2.0
289 stars 207 forks source link

Issues with Version 1.0.0 #301

Closed helly25 closed 1 month ago

helly25 commented 5 months ago

When updating to version 1.0.0 for github.com/helly25/mbo #23, then I get issues on Ubuntu.

Details:

So #292 Fails on MacOS if lld is used but passes on Ubuntu and on MacOS with default linker.

Since #294 however on Ubuntu the C++20 modules appear to be active incorrectly. This can also not be disabled by passing necessary compiler flags.

ahojnnes commented 4 months ago

I am facing the same issue. @helly25 Any workaround that you discovered?

helly25 commented 4 months ago

I could not find an easy solution. So for the time being I have pinned my repos to a commit hash just before version 1.0.0.

hcoona commented 2 months ago

--cxxopt=-Xclang --cxxopt=-fno-cxx-modules can mitigate it but we need a fundamental solution.

jsharpe commented 2 months ago

--cxxopt=-Xclang --cxxopt=-fno-cxx-modules can mitigate it but we need a fundamental solution.

@fmeum's fix in https://github.com/bazel-contrib/toolchains_llvm/pull/337 should have resolved that issue - are you seeing it even with that patch applied? Appreciate it hasn't made it into a release yet, we're probably overdue cutting a new version.

helly25 commented 1 month ago

I tried successfully #337 with https://github.com/helly25/mbo/releases/tag/0.2.27 but I have a private repository where it causes issues. I'll investigate that further.

helly25 commented 1 month ago

The issue I now have with the private repo is that _system_module_map now uses ctx.actions.template_dict().join_all() with arg allow_closure = True. That requires Bazel version 7+ which I cannot use yet in that repo.

helly25 commented 1 month ago

After applying the fix from #337 the mentioned private repository works fine after upgrading to Bazel 7.2.1.

It also works in v1.1.2 without patching.

@ahojnnes Feel free to reopen the bug if this still fails for you with an actual supported Bazel version.