[all-commits] [llvm/llvm-project] 72c729: [bazel] Add support for --incompatible_disallow_em...

Keith Smiley via All-commits all-commits at lists.llvm.org
Fri Mar 22 09:51:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72c729f354d71697a1402720c90b57ff521b6739
      https://github.com/llvm/llvm-project/commit/72c729f354d71697a1402720c90b57ff521b6739
  Author: Keith Smiley <keithbsmiley at gmail.com>
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
    M utils/bazel/.bazelrc
    M utils/bazel/llvm-project-overlay/bolt/BUILD.bazel
    M utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/defs.bzl
    M utils/bazel/llvm-project-overlay/clang/BUILD.bazel
    M utils/bazel/llvm-project-overlay/lld/BUILD.bazel
    M utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
    M utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
    M utils/bazel/llvm-project-overlay/mlir/unittests/BUILD.bazel

  Log Message:
  -----------
  [bazel] Add support for --incompatible_disallow_empty_glob (#85999)

This bazel flag, that should be flipped in an upcoming release
https://github.com/bazelbuild/bazel/pull/15327, fails if globs have no
matches. This helps find libraries where you are accidentally not
including files because of typos. This change removes the various globs
that were not matching anything, and uncovered some targets that were
doing nothing because their source files were deleted. There are a few
cases where globs were intentionally optional in the case of loops that
expanded to different potential options, so those now use `allow_empty =
True`. This allows downstream consumers to also flip this flags for
their own builds, where previously this would fail in LLVM instead.

The downside to this change is that if files are added in these
relatively standard locations, manual work will have to be done to add
this patterns back. If folks prefer we could instead add `allow_empty =
True` to every glob.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list