From 01cf2299fbda57abbbf5df0b70227b955ce23a30 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 22 Oct 2020 09:59:37 -0500 Subject: [PATCH] Fix //examples/test_cc_shared_library:linking_action_test under --incompatible_linkopts_to_linklibs. --- examples/test_cc_shared_library/starlark_tests.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/test_cc_shared_library/starlark_tests.bzl b/examples/test_cc_shared_library/starlark_tests.bzl index 950b08d..c5d9fd4 100644 --- a/examples/test_cc_shared_library/starlark_tests.bzl +++ b/examples/test_cc_shared_library/starlark_tests.bzl @@ -10,7 +10,7 @@ def _linking_suffix_test_impl(ctx): actions = analysistest.target_actions(env) for arg in reversed(actions[1].argv): - if arg.find(".a") != -1 or arg.find("-l") != -1: + if (arg.find(".a") != -1 or arg.find("-l") != -1) and "/" in arg: asserts.equals(env, "liba_suffix.a", arg[arg.rindex("/") + 1:]) break