diff options
author | lberki <lberki@google.com> | 2018-01-26 05:37:58 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-26 05:39:14 -0800 |
commit | c026569c445a5b22903d17ea6691876c47059eba (patch) | |
tree | ae3245e8494733834dc77f6ab2fd346195235143 /src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java | |
parent | a59e60e4fba191b8793254c38485f781f790a607 (diff) |
Add a few options that tweak the host configuration to parallel those that do the same with the target one.
I'm not exactly happy at this development, but we already have a host of --host_* options so it's only incremental badness.
Fixes #4484.
RELNOTES: None.
PiperOrigin-RevId: 183375817
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index 3b54a8b17c..d5aa190596 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -604,10 +604,22 @@ public class BuildConfiguration implements BuildEvent { category = "semantics", // Should this be "flags"? documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, effectTags = { OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.ACTION_COMMAND_LINES }, - help = "Specify the mode the binary will be built in. " + "Values: 'fastbuild', 'dbg', 'opt'." + help = "Specify the mode the binary will be built in. Values: 'fastbuild', 'dbg', 'opt'." ) public CompilationMode compilationMode; + @Option( + name = "host_compilation_mode", + converter = CompilationMode.Converter.class, + defaultValue = "opt", + category = "semantics", // Should this be "flags"? + documentationCategory = OptionDocumentationCategory.OUTPUT_PARAMETERS, + effectTags = { OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.ACTION_COMMAND_LINES }, + help = "Specify the mode the tools used during the build will be built in. Values: " + + "'fastbuild', 'dbg', 'opt'." + ) + public CompilationMode hostCompilationMode; + /** * This option is used internally to set output directory name of the <i>host</i> configuration * to a constant, so that the output files for the host are completely independent of those for @@ -1066,7 +1078,7 @@ public class BuildConfiguration implements BuildEvent { Options host = (Options) getDefault(); host.outputDirectoryName = "host"; - host.compilationMode = CompilationMode.OPT; + host.compilationMode = hostCompilationMode; host.isHost = true; host.configsMode = configsMode; host.enableRunfiles = enableRunfiles; |