[llvm] [bazel] Switch mach_gen to apple_genrule (PR #96551)
Keith Smiley via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 13:33:45 PDT 2024
https://github.com/keith updated https://github.com/llvm/llvm-project/pull/96551
>From 9dd360219c529391af583f97dcf3d01591854a35 Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Mon, 24 Jun 2024 20:31:15 +0000
Subject: [PATCH 1/2] [bazel] Switch mach_gen to apple_genrule
mig is a tool vendored with Xcode. Using apple_genrule makes sure that
the bazel selected version of Xcode is preferred, and that the action is
invalidated when that version changes.
---
utils/bazel/llvm-project-overlay/lldb/BUILD.bazel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
index ddcaea5184d43..095092efb20fd 100644
--- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
@@ -869,7 +869,7 @@ cc_library(
],
)
-genrule(
+apple_genrule(
name = "mach_gen",
srcs = ["tools/debugserver/source/MacOSX/dbgnub-mig.defs"],
outs = [
>From f7c1e3926779f31959c38ffdbca45c0c99468e89 Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Mon, 24 Jun 2024 20:33:31 +0000
Subject: [PATCH 2/2] mark manual for linux builds
---
utils/bazel/llvm-project-overlay/lldb/BUILD.bazel | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
index 095092efb20fd..50da7411a1c2f 100644
--- a/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
@@ -878,7 +878,10 @@ apple_genrule(
"mach_excUser.c",
],
cmd = "mig -header $(location :mach_exc.h) -server $(location :mach_excServer.c) -user $(location :mach_excUser.c) $(SRCS)",
- tags = ["nobuildkite"],
+ tags = [
+ "manual",
+ "nobuildkite",
+ ],
target_compatible_with = select({
"@platforms//os:macos": [],
"//conditions:default": ["@platforms//:incompatible"],
More information about the llvm-commits
mailing list