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 @@ -2591,16 +2591,18 @@ name = "Exegesis", srcs = glob([ "tools/llvm-exegesis/lib/*.cpp", - "tools/llvm-exegesis/lib/AArch64/*.cpp", - "tools/llvm-exegesis/lib/PowerPC/*.cpp", - "tools/llvm-exegesis/lib/X86/*.cpp", - "tools/llvm-exegesis/lib/X86/*.h", # We have to include these headers here as well as in the `hdrs` below # to allow the `.cpp` files to use file-relative-inclusion to find # them, even though consumers of this library use inclusion relative to # `tools/llvm-exegesis/lib` with the `strip_includes_prefix` of this # library. This mixture appears to be incompatible with header modules. "tools/llvm-exegesis/lib/*.h", + ] + [ + "tools/llvm-exegesis/lib/{}/*.cpp".format(t) + for t in llvm_target_exegesis + ] + [ + "tools/llvm-exegesis/lib/{}/*.h".format(t) + for t in llvm_target_exegesis ]), hdrs = glob(["tools/llvm-exegesis/lib/*.h"]), copts = llvm_copts + ["-DHAVE_LIBPFM=1"],