diff --git a/utils/bazel/.bazelrc b/utils/bazel/.bazelrc --- a/utils/bazel/.bazelrc +++ b/utils/bazel/.bazelrc @@ -25,6 +25,11 @@ # Add layering check to all projects. build --features=layering_check +# Opt out of legacy lax behavior implicitly exporting files that are rule inputs +# with default visibility. +# See: https://bazel.build/reference/be/functions#exports_files +build --incompatible_no_implicit_file_export + ############################################################################### # Options to select different strategies for linking potential dependent # libraries. The default leaves it disabled. diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -17,7 +17,18 @@ licenses(["notice"]) -exports_files(["LICENSE.TXT"]) +exports_files([ + "LICENSE.TXT", + "cmake/modules/llvm-driver-template.cpp.in", + "include/llvm/CodeGen/SDNodeProperties.td", + "include/llvm/CodeGen/ValueTypes.td", + "include/llvm/Frontend/Directive/DirectiveBase.td", + "include/llvm/Frontend/OpenACC/ACC.td", + "include/llvm/Frontend/OpenMP/OMP.td", + "include/llvm/IR/Intrinsics.td", + "include/llvm/Option/OptParser.td", + "utils/lit/lit.py", +]) # It may be tempting to add compiler flags here, but that should be avoided. # The necessary warnings and other compile flags should be provided by the