Skip to content

Commit

Permalink
Do not enable random features in cc_common.configure_features
Browse files Browse the repository at this point in the history
This change removes some hardcoded feature names when #6861 is flipped.

RELNOTES: None.
PiperOrigin-RevId: 227110386
  • Loading branch information
hlopko authored and Copybara-Service committed Dec 28, 2018
1 parent c1b4912 commit 1be4cbc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
12 changes: 0 additions & 12 deletions site/docs/crosstool-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,18 +988,6 @@ conditions.
<td>Enabled by default based on linking mode.
</td>
</tr>
<tr>
<td><strong><code>random_seed</code></strong>
</td>
<td>Enabled by default.
</td>
</tr>
<tr>
<td><strong><code>dependency_file</code></strong>
</td>
<td>Enabled by default.
</td>
</tr>
<tr>
<td><strong><code>per_object_debug_info</code></strong>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,10 @@ public static FeatureConfiguration configureFeaturesOrThrowEvalException(
ImmutableList.Builder<String> allFeatures =
new ImmutableList.Builder<String>()
.addAll(ImmutableSet.of(toolchain.getCompilationMode().toString()))
.addAll(DEFAULT_FEATURES)
.addAll(
cppConfiguration.disableLegacyCrosstoolFields()
? ImmutableList.of()
: DEFAULT_FEATURES)
.addAll(DEFAULT_ACTION_CONFIGS)
.addAll(requestedFeatures)
.addAll(toolchain.getFeatures().getDefaultFeaturesAndActionConfigs());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
Joiner.on("\n")
.join(
" name: 'dependency_file'",
" enabled: true",
" flag_set {",
" action: 'assemble'",
" action: 'preprocess-assemble'",
Expand Down Expand Up @@ -118,6 +119,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
Joiner.on("\n")
.join(
" name: 'random_seed'",
" enabled: true",
" flag_set {",
" action: 'c-compile'",
" action: 'c++-compile'",
Expand All @@ -135,6 +137,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
Joiner.on("\n")
.join(
" name: 'pic'",
" enabled: true",
" flag_set {",
" action: 'assemble'",
" action: 'preprocess-assemble'",
Expand Down Expand Up @@ -173,6 +176,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
Joiner.on("\n")
.join(
" name: 'preprocessor_defines'",
" enabled: true",
" flag_set {",
" action: 'preprocess-assemble'",
" action: 'linkstamp-compile'",
Expand Down Expand Up @@ -218,6 +222,7 @@ public static ImmutableList<CToolchain.Feature> getLegacyFeatures(
Joiner.on("\n")
.join(
" name: 'include_paths'",
" enabled: true",
" flag_set {",
" action: 'preprocess-assemble'",
" action: 'linkstamp-compile'",
Expand Down

0 comments on commit 1be4cbc

Please sign in to comment.