Fix //examples/test_cc_shared_library:linking_action_test under --incompatible_linkopts_to_linklibs.

This commit is contained in:
Benjamin Peterson 2020-10-22 09:59:37 -05:00
parent f055da4ff0
commit 01cf2299fb
1 changed files with 1 additions and 1 deletions

View File

@ -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