diff --git a/tools/migration/legacy_fields_migration_lib.py b/tools/migration/legacy_fields_migration_lib.py index 7e7c642..6107f92 100644 --- a/tools/migration/legacy_fields_migration_lib.py +++ b/tools/migration/legacy_fields_migration_lib.py @@ -66,12 +66,12 @@ def link_actions(toolchain): return ALL_CC_LINK_ACTIONS -def transitive_link_actions(toolchain): +def executable_link_actions(toolchain): """Returns transitive link actions for cc or objc rules.""" if _is_objc_toolchain(toolchain): - return TRANSITIVE_LINK_ACTIONS + ALL_OBJC_LINK_ACTIONS + return CC_LINK_EXECUTABLE + ALL_OBJC_LINK_ACTIONS else: - return TRANSITIVE_LINK_ACTIONS + return CC_LINK_EXECUTABLE def _is_objc_toolchain(toolchain): @@ -429,7 +429,7 @@ def _extract_legacy_link_flag_sets_for(toolchain): ]) result.append([ feature_name, - transitive_link_actions(toolchain), lmf.linker_flag, [] + executable_link_actions(toolchain), lmf.linker_flag, [] ]) elif mode == "MOSTLY_STATIC": result.append( diff --git a/tools/migration/legacy_fields_migration_lib_test.py b/tools/migration/legacy_fields_migration_lib_test.py index a47ad52..93972cc 100644 --- a/tools/migration/legacy_fields_migration_lib_test.py +++ b/tools/migration/legacy_fields_migration_lib_test.py @@ -524,7 +524,7 @@ class LegacyFieldsMigrationLibTest(unittest.TestCase): self.assertEqual(output.feature[0].flag_set[5].flag_group[0].flag, ["lmf-dynamic-flag-4"]) self.assertEqual(output.feature[0].flag_set[5].action, - TRANSITIVE_LINK_ACTIONS) + CC_LINK_EXECUTABLE) self.assertEqual(output.feature[0].flag_set[6].flag_group[0].flag, ["dl-flag-5"])