ulfjack | b5daae3 | 2018-06-13 07:59:33 -0700 | [diff] [blame] | 1 | // Copyright 2018 The Bazel Authors. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package com.google.devtools.build.lib.analysis; |
| 16 | |
| 17 | import com.google.devtools.build.lib.util.RegexFilter; |
| 18 | import com.google.devtools.common.options.Option; |
| 19 | import com.google.devtools.common.options.OptionDocumentationCategory; |
| 20 | import com.google.devtools.common.options.OptionEffectTag; |
| 21 | import com.google.devtools.common.options.OptionsBase; |
| 22 | |
| 23 | /** |
| 24 | * Options that affect the <i>mechanism</i> of analysis. These are distinct from {@link |
| 25 | * com.google.devtools.build.lib.analysis.config.BuildOptions}, which affect the <i>value</i> of a |
| 26 | * BuildConfiguration. |
| 27 | */ |
| 28 | public class AnalysisOptions extends OptionsBase { |
| 29 | @Option( |
| 30 | name = "analysis_warnings_as_errors", |
| 31 | deprecationWarning = |
| 32 | "analysis_warnings_as_errors is now a no-op and will be removed in" |
| 33 | + " an upcoming Blaze release", |
| 34 | defaultValue = "false", |
| 35 | documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, |
| 36 | effectTags = {OptionEffectTag.NO_OP}, |
| 37 | help = "Treat visible analysis warnings as errors." |
| 38 | ) |
| 39 | public boolean analysisWarningsAsErrors; |
| 40 | |
| 41 | @Option( |
| 42 | name = "discard_analysis_cache", |
| 43 | defaultValue = "false", |
| 44 | documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, |
| 45 | effectTags = {OptionEffectTag.UNKNOWN}, |
| 46 | help = |
| 47 | "Discard the analysis cache immediately after the analysis phase completes." |
| 48 | + " Reduces memory usage by ~10%, but makes further incremental builds slower." |
| 49 | ) |
| 50 | public boolean discardAnalysisCache; |
| 51 | |
| 52 | @Option( |
| 53 | name = "experimental_extra_action_filter", |
| 54 | defaultValue = "", |
| 55 | converter = RegexFilter.RegexFilterConverter.class, |
| 56 | documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, |
| 57 | effectTags = {OptionEffectTag.UNKNOWN}, |
| 58 | help = "Filters set of targets to schedule extra_actions for." |
| 59 | ) |
| 60 | public RegexFilter extraActionFilter; |
| 61 | |
| 62 | @Option( |
| 63 | name = "experimental_extra_action_top_level_only", |
| 64 | defaultValue = "false", |
| 65 | documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, |
| 66 | effectTags = {OptionEffectTag.UNKNOWN}, |
| 67 | help = "Only schedules extra_actions for top level targets." |
| 68 | ) |
| 69 | public boolean extraActionTopLevelOnly; |
| 70 | |
| 71 | @Option( |
| 72 | name = "version_window_for_dirty_node_gc", |
| 73 | defaultValue = "0", |
| 74 | documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, |
| 75 | effectTags = {OptionEffectTag.UNKNOWN}, |
| 76 | help = |
| 77 | "Nodes that have been dirty for more than this many versions will be deleted" |
| 78 | + " from the graph upon the next update. Values must be non-negative long integers," |
| 79 | + " or -1 indicating the maximum possible window." |
| 80 | ) |
| 81 | public long versionWindowForDirtyNodeGc; |
| 82 | |
| 83 | @Deprecated |
| 84 | @Option( |
| 85 | name = "experimental_interleave_loading_and_analysis", |
| 86 | defaultValue = "true", |
| 87 | documentationCategory = OptionDocumentationCategory.UNCATEGORIZED, |
| 88 | effectTags = {OptionEffectTag.UNKNOWN}, |
| 89 | help = "No-op." |
| 90 | ) |
| 91 | public boolean interleaveLoadingAndAnalysis; |
ulfjack | 36fbbde | 2018-08-02 05:16:00 -0700 | [diff] [blame] | 92 | |
| 93 | @Option( |
| 94 | name = "experimental_skyframe_prepare_analysis", |
| 95 | defaultValue = "false", |
| 96 | documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, |
| 97 | effectTags = {OptionEffectTag.BAZEL_INTERNAL_CONFIGURATION}, |
| 98 | help = "Switches analysis preparation to a new code path based on Skyframe." |
| 99 | ) |
| 100 | public boolean skyframePrepareAnalysis; |
ulfjack | b5daae3 | 2018-06-13 07:59:33 -0700 | [diff] [blame] | 101 | } |