From ddf13fe1da21df51e21f5fd80f35a579d6f09bb7 Mon Sep 17 00:00:00 2001 From: hlopko Date: Thu, 24 Jan 2019 04:55:01 -0800 Subject: [PATCH] Don't require supports_fission to be set in the crosstool Having a 'per_object_debug_data' feature enabled is giving the same signal as having supports_fission enabled. This is a safe change because all crosstools that have supports_fission: true have per_object_debug_info disabled, and with the legacy crosstool fields migration we will migrate this feature to be enabled by default for these crosstools. https://github.com/bazelbuild/bazel/issues/6861 https://github.com/bazelbuild/bazel/issues/5883 RELNOTES: None. PiperOrigin-RevId: 230701029 --- tools/migration/legacy_fields_migration_lib.py | 1 + tools/migration/legacy_fields_migration_lib_test.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/migration/legacy_fields_migration_lib.py b/tools/migration/legacy_fields_migration_lib.py index cd20e35..a7f64be 100644 --- a/tools/migration/legacy_fields_migration_lib.py +++ b/tools/migration/legacy_fields_migration_lib.py @@ -137,6 +137,7 @@ def migrate_legacy_fields(crosstool): # } feature = toolchain.feature.add() feature.name = "per_object_debug_info" + feature.enabled = True flag_set = feature.flag_set.add() flag_set.action[:] = [ "c-compile", "c++-compile", "c++-module-codegen", "assemble", diff --git a/tools/migration/legacy_fields_migration_lib_test.py b/tools/migration/legacy_fields_migration_lib_test.py index 2a9ece2..298b72e 100644 --- a/tools/migration/legacy_fields_migration_lib_test.py +++ b/tools/migration/legacy_fields_migration_lib_test.py @@ -938,7 +938,7 @@ class LegacyFieldsMigrationLibTest(unittest.TestCase): migrate_legacy_fields(crosstool) output = crosstool.toolchain[0] self.assertEqual(output.feature[0].name, "per_object_debug_info") - self.assertEqual(output.feature[0].enabled, False) + self.assertEqual(output.feature[0].enabled, True) def test_supports_fission_not_migrated_on_false(self): crosstool = make_crosstool("supports_fission: false")