Skip to content

Commit 9d61ee4

Browse files
authored
Revert CppLink workaround (#974)
My upstream PR renaming archives to CppArchive landed in 6.x+ Partial revert of d09eca8
1 parent 34b4cb3 commit 9d61ee4

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

test/rules/action_command_line_test.bzl

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,15 @@ def _action_command_line_test_impl(ctx):
4444
)
4545
return analysistest.end(env)
4646
if len(matching_actions) != 1:
47-
# This is a hack to avoid CppLink meaning binary linking and static
48-
# library archiving https://github.com/bazelbuild/bazel/pull/15060
49-
if mnemonic == "CppLink" and len(matching_actions) == 2:
50-
matching_actions = [
51-
action
52-
for action in matching_actions
53-
if action.argv[0] not in [
54-
"/usr/bin/ar",
55-
"external/local_config_cc/libtool",
56-
"external/local_config_apple_cc/libtool",
57-
]
58-
]
59-
if len(matching_actions) != 1:
60-
unittest.fail(
61-
env,
62-
("Expected exactly one action with the mnemonic '{}', " +
63-
"but found {}.").format(
64-
mnemonic,
65-
len(matching_actions),
66-
),
67-
)
68-
return analysistest.end(env)
47+
unittest.fail(
48+
env,
49+
("Expected exactly one action with the mnemonic '{}', " +
50+
"but found {}.").format(
51+
mnemonic,
52+
len(matching_actions),
53+
),
54+
)
55+
return analysistest.end(env)
6956

7057
action = matching_actions[0]
7158
message_prefix = "In {} action for target '{}', ".format(

0 commit comments

Comments
 (0)