Damien Martin-Guillerez | f88f4d8 | 2015-09-25 13:56:55 +0000 | [diff] [blame] | 1 | // Copyright 2014 The Bazel Authors. All rights reserved. |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 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.runtime; |
| 16 | |
| 17 | import com.google.devtools.common.options.Option; |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 18 | import com.google.devtools.common.options.OptionDocumentationCategory; |
ccalvarin | c82a197 | 2017-07-17 21:13:39 +0200 | [diff] [blame] | 19 | import com.google.devtools.common.options.OptionEffectTag; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 20 | import com.google.devtools.common.options.OptionsBase; |
Ulf Adams | 6f09666 | 2016-06-27 15:51:23 +0000 | [diff] [blame] | 21 | import java.util.List; |
| 22 | |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 23 | /** |
| 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 | */ |
| 30 | public class HostJvmStartupOptions extends OptionsBase { |
| 31 | |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 32 | @Option( |
cushon | 2a8b657 | 2018-07-25 10:33:40 -0700 | [diff] [blame] | 33 | name = "server_javabase", |
Dan Fabulich | 1d35ca0 | 2018-07-05 16:08:06 -0700 | [diff] [blame] | 34 | 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.") |
cushon | 2a8b657 | 2018-07-25 10:33:40 -0700 | [diff] [blame] | 39 | public String serverJavabase; |
Lukacs Berki | bfd9aa3 | 2017-03-06 11:21:35 +0000 | [diff] [blame] | 40 | |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 41 | @Option( |
Googler | ea0c110 | 2020-03-27 09:30:59 -0700 | [diff] [blame] | 42 | 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 Adams | 6f09666 | 2016-06-27 15:51:23 +0000 | [diff] [blame] | 49 | public List<String> hostJvmArgs; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 50 | |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 51 | @Option( |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 52 | name = "host_jvm_debug", |
| 53 | defaultValue = "null", // NOTE: purely decorative! See BlazeServerStartupOptions. |
ccalvarin | 3bc1547 | 2017-06-27 17:58:35 +0200 | [diff] [blame] | 54 | 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 Adams | 6f09666 | 2016-06-27 15:51:23 +0000 | [diff] [blame] | 65 | public Void hostJvmDebug; |
Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 66 | } |