Skip to content

Commit 8d66a41

Browse files
comiuscopybara-github
authored andcommitted
Change host to exec configuration in builtin rules.
PiperOrigin-RevId: 405592176
1 parent cbc5581 commit 8d66a41

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/main/starlark/builtins_bzl/common/cc/cc_import.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ cc_import = rule(
235235
"_grep_includes": attr.label(
236236
allow_files = True,
237237
executable = True,
238-
cfg = "host",
238+
cfg = "exec",
239239
default = Label("@" + semantics.get_repo() + "//tools/cpp:grep-includes"),
240240
),
241241
"_cc_toolchain": attr.label(default = "@" + semantics.get_repo() + "//tools/cpp:current_cc_toolchain"),

src/main/starlark/builtins_bzl/common/cc/cc_library.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ attrs = {
616616
"_grep_includes": attr.label(
617617
allow_files = True,
618618
executable = True,
619-
cfg = "host",
619+
cfg = "exec",
620620
default = Label("@" + semantics.get_repo() + "//tools/cpp:grep-includes"),
621621
),
622622
"_cc_toolchain": attr.label(default = "@//tools/cpp:current_cc_toolchain"),

src/main/starlark/builtins_bzl/common/objc/attrs.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ _COMPILE_DEPENDENCY_RULE = {
8585
_INCLUDE_SCANNING_RULE = {
8686
"_grep_includes": attr.label(
8787
allow_single_file = True,
88-
cfg = "host",
88+
cfg = "exec",
8989
default = "@" + semantics.get_repo() + "//tools/cpp:grep-includes",
9090
executable = True,
9191
),
@@ -103,7 +103,7 @@ _COPTS_RULE = {
103103

104104
_XCRUN_RULE = {
105105
"_xcrunwrapper": attr.label(
106-
cfg = "host",
106+
cfg = "exec",
107107
default = "@" + semantics.get_repo() + "//tools/objc:xcrunwrapper",
108108
executable = True,
109109
),

src/test/java/com/google/devtools/build/lib/rules/objc/AppleStaticLibraryTest.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ public void testLipoAction() throws Exception {
139139
assertThat(Artifact.toRootRelativePaths(action.getInputs())).containsAtLeast(i386Lib, x8664Lib);
140140

141141
assertContainsSublist(
142-
action.getArguments(),
143-
ImmutableList.of(MOCK_XCRUNWRAPPER_EXECUTABLE_PATH, LIPO, "-create"));
142+
removeConfigFragment(action.getArguments()),
143+
ImmutableList.of(removeConfigFragment(MOCK_XCRUNWRAPPER_EXECUTABLE_PATH), LIPO, "-create"));
144144
String binFragment =
145145
removeConfigFragment(targetConfig.getBinFragment(RepositoryName.MAIN) + "/");
146146
assertThat(removeConfigFragment(action.getArguments()))
@@ -223,8 +223,9 @@ public void testWatchSimulatorLipoAction() throws Exception {
223223
assertThat(Artifact.toRootRelativePaths(action.getInputs()))
224224
.containsAtLeast(i386Bin, armv7kBin);
225225

226-
assertContainsSublist(action.getArguments(), ImmutableList.of(
227-
MOCK_XCRUNWRAPPER_EXECUTABLE_PATH, LIPO, "-create"));
226+
assertContainsSublist(
227+
removeConfigFragment(action.getArguments()),
228+
ImmutableList.of(removeConfigFragment(MOCK_XCRUNWRAPPER_EXECUTABLE_PATH), LIPO, "-create"));
228229
String binFragment =
229230
removeConfigFragment(targetConfig.getBinFragment(RepositoryName.MAIN) + "/");
230231
assertThat(removeConfigFragment(action.getArguments()))

0 commit comments

Comments
 (0)