Clear dynamic_library_linker_flag in legacy_fields_migrator

RELNOTES: None.
PiperOrigin-RevId: 234748020
This commit is contained in:
hlopko 2019-02-20 00:25:00 -08:00 committed by Copybara-Service
parent 2e79abf8ca
commit 7e835b273a
2 changed files with 2 additions and 1 deletions

View File

@ -298,6 +298,7 @@ def migrate_legacy_fields(crosstool):
toolchain.ClearField("compiler_flag")
toolchain.ClearField("cxx_flag")
toolchain.ClearField("linker_flag")
toolchain.ClearField("dynamic_library_linker_flag")
toolchain.ClearField("static_runtimes_filegroup")
toolchain.ClearField("dynamic_runtimes_filegroup")

View File

@ -318,7 +318,7 @@ class LegacyFieldsMigrationLibTest(unittest.TestCase):
""")
migrate_legacy_fields(crosstool)
output = crosstool.toolchain[0]
self.assertEqual(len(output.linker_flag), 0)
self.assertEqual(len(output.dynamic_library_linker_flag), 0)
self.assertEqual(output.feature[0].name, "default_link_flags")
self.assertEqual(output.feature[0].flag_set[0].action,
DYNAMIC_LIBRARY_LINK_ACTIONS)