blob: f74bd8318042e7bf360f4831a3950300c18e782f [file] [log] [blame]
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00001// Copyright 2014 The Bazel Authors. All rights reserved.
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +01002//
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
15package com.google.devtools.build.lib.runtime;
16
17import com.google.devtools.common.options.Option;
ccalvarin3bc15472017-06-27 17:58:35 +020018import com.google.devtools.common.options.OptionDocumentationCategory;
ccalvarinc82a1972017-07-17 21:13:39 +020019import com.google.devtools.common.options.OptionEffectTag;
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010020import com.google.devtools.common.options.OptionsBase;
Ulf Adams6f096662016-06-27 15:51:23 +000021import java.util.List;
22
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010023/**
24 * Options that will be evaluated by the blaze client startup code only.
25 *
26 * The only reason we have this interface is that we'd like to print a nice
27 * help page for the client startup options. These options do not affect the
28 * server's behavior in any way.
29 */
30public class HostJvmStartupOptions extends OptionsBase {
31
ccalvarin3bc15472017-06-27 17:58:35 +020032 @Option(
cushon2a8b6572018-07-25 10:33:40 -070033 name = "server_javabase",
Dan Fabulich1d35ca02018-07-05 16:08:06 -070034 defaultValue = "", // NOTE: purely decorative! See BlazeServerStartupOptions.
35 valueHelp = "<jvm path>",
36 documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
37 effectTags = {OptionEffectTag.UNKNOWN},
38 help = "Path to the JVM used to execute Bazel itself.")
cushon2a8b6572018-07-25 10:33:40 -070039 public String serverJavabase;
Lukacs Berkibfd9aa32017-03-06 11:21:35 +000040
ccalvarin3bc15472017-06-27 17:58:35 +020041 @Option(
Googlerea0c1102020-03-27 09:30:59 -070042 name = "host_jvm_args",
43 defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions.
44 allowMultiple = true,
45 valueHelp = "<jvm_arg>",
46 documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
47 effectTags = {OptionEffectTag.UNKNOWN},
48 help = "Flags to pass to the JVM executing Blaze.")
Ulf Adams6f096662016-06-27 15:51:23 +000049 public List<String> hostJvmArgs;
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010050
ccalvarin3bc15472017-06-27 17:58:35 +020051 @Option(
ccalvarin3bc15472017-06-27 17:58:35 +020052 name = "host_jvm_debug",
53 defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions.
ccalvarin3bc15472017-06-27 17:58:35 +020054 documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
55 effectTags = {OptionEffectTag.UNKNOWN},
56 help =
57 "Convenience option to add some additional JVM startup flags, which cause "
58 + "the JVM to wait during startup until you connect from a JDWP-compliant debugger "
59 + "(like Eclipse) to port 5005.",
60 expansion = {
61 "--host_jvm_args=-Xdebug",
62 "--host_jvm_args=-Xrunjdwp:transport=dt_socket,server=y,address=5005",
63 }
64 )
Ulf Adams6f096662016-06-27 15:51:23 +000065 public Void hostJvmDebug;
Han-Wen Nienhuysd08b27f2015-02-25 16:45:20 +010066}