mirror of https://github.com/bazelbuild/rules_cc
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
This commit is contained in:
parent
a9932b3939
commit
ddf13fe1da
|
@ -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",
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue