Skip to content

20221212.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@aaronmondal aaronmondal released this 12 Dec 16:37
· 272 commits to main since this release

💮 Internal changes

Reworked the internal build directory structure. Artifacts are no longer loosely in bazel-bin. Instead, every target now creates a directory of the same name and artifacts are in these directories. This enables us to build the same file in multiple configurations in the same build.

❤️‍🩹 Fixes and known issues

This release is based on llvm/llvm-project@3661458, which includes an important fix for using <format> in modules. Libraries like spdlog can now be #included in the GMFs of module interface and implementation units without crashing clang.

If you get weird errors regarding symbol visibility in C++ modules, check if the library that breaks uses #pragma once before include guards. This is currently a bug in clang. A workaround is to either remove #pragma once in the problematic headers or swap the include guards to be defined before the pragma.

⚗️ Experimental OpenMP CPU support

Added a new compilation_mode = "omp_cpu" flag which enables #include "omp.h" and use of OpenMP pragmas. This is very experimental right now. Our goal with this will be to enable OpenMP GPU offloading in the future.

🎄 Multi-target compilation databases

The target attribute has been removed from ll_compilation_database. Instead it now expects a list of targets in the targets (with s) attribute. To migrate, change your buildfiles from

ll_compilation_database(
    ...
    target = ":mytarget",
)

to

ll_compilation_database(
    ...
    targets = [":mytarget"],
)

Keep in mind that if you have a directory structure like

BUILD.bazel
- pkg1
  BUILD.bazel  # contains "target1"
- pkg2
  BUILD.bazel  # contains "target2"

and you want to use a single ll_compilation_database at the root build file for the entire project, the visibilities for target1 and target2 need to be set to something like visibility = ["@//:__pkg__"] (or visibility = ["@myproject//:__pkg__"], if your project specifies a module name).