Explicitly tag host-only targets. We will still exclude directories (like the compiler) from device testing, but in directories where there's a mix, assume targets are device-compatible unless they are tagged otherwise. Upstream we use this for determining what targets to run on continuous builds for e.g. arm emulators. Since the lit runner itself doesn't run on device (I don't think?) we could also modify the lit test macro to always add the hostonly tag. That seemed like unnecessary magic for just a couple targets though, since our usage of lit tests should be pretty limited. PiperOrigin-RevId: 302503752
diff --git a/iree/modules/check/test/BUILD b/iree/modules/check/test/BUILD index bfe4411..4fd03e2 100644 --- a/iree/modules/check/test/BUILD +++ b/iree/modules/check/test/BUILD
@@ -29,6 +29,7 @@ "//iree/modules/check:iree-check-module", "//iree/tools:IreeFileCheck", ], + tags = ["hostonly"], ) iree_bytecode_module(
diff --git a/iree/tools/BUILD b/iree/tools/BUILD index d50e575..83c8585 100644 --- a/iree/tools/BUILD +++ b/iree/tools/BUILD
@@ -13,7 +13,7 @@ # limitations under the License. # Misc tools used to optimize, translate, and evaluate IREE. -# Most of these are not designed to run on-device. +# Compiler tooling, like the compiler, is not designed to run on device and is tagged as "hostonly". load("//iree:build_defs.oss.bzl", "IREE_DRIVER_MODULES", "PLATFORM_VULKAN_DEPS") @@ -141,6 +141,7 @@ cc_binary( name = "iree-opt", + tags = ["hostonly"], deps = [ ":iree_opt_main", ], @@ -149,6 +150,7 @@ cc_binary( name = "iree-run-mlir", srcs = ["run_mlir_main.cc"], + tags = ["hostonly"], deps = [ ":PassesAndDialects", ":vm_util", @@ -203,6 +205,7 @@ linkopts = [ "-lpthread", ], + tags = ["hostonly"], deps = [ "//iree/compiler/Dialect/VM/Tools", "@llvm-project//mlir:MlirTableGenMain", @@ -233,6 +236,7 @@ cc_binary( name = "iree-translate", + tags = ["hostonly"], deps = [ ":iree_translate_main", ], @@ -243,6 +247,7 @@ testonly = True, srcs = ["IreeFileCheck.sh"], data = ["@llvm-project//llvm:FileCheck"], + tags = ["hostonly"], ) # TODO(b/146898896): Refactor these into more coherent packages.
diff --git a/iree/tools/test/BUILD b/iree/tools/test/BUILD index f8b0aca..7f37f5f 100644 --- a/iree/tools/test/BUILD +++ b/iree/tools/test/BUILD
@@ -31,4 +31,5 @@ "//iree/tools:iree-run-module", "//iree/tools:iree-translate", ], + tags = ["hostonly"], )