Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 1 | // Copyright 2016 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 | // |
Thiago Farina | 676cb9f | 2016-10-06 11:00:43 +0000 | [diff] [blame] | 15 | // global_variables.h: The global state in the blaze.cc Blaze client. |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 16 | // |
| 17 | |
Thiago Farina | 676cb9f | 2016-10-06 11:00:43 +0000 | [diff] [blame] | 18 | #ifndef BAZEL_SRC_MAIN_CPP_GLOBAL_VARIABLES_H_ |
| 19 | #define BAZEL_SRC_MAIN_CPP_GLOBAL_VARIABLES_H_ |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 20 | |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 21 | #include <sys/types.h> |
| 22 | #include <string> |
| 23 | #include <vector> |
| 24 | |
Laszlo Csomor | 3b89d2d | 2016-11-28 14:04:27 +0000 | [diff] [blame] | 25 | #include "src/main/cpp/util/port.h" // pid_t on Windows/MSVC |
| 26 | |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 27 | namespace blaze { |
| 28 | |
Thiago Farina | 676cb9f | 2016-10-06 11:00:43 +0000 | [diff] [blame] | 29 | class StartupOptions; |
| 30 | |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 31 | struct GlobalVariables { |
michajlo | ce5e718 | 2019-06-03 13:16:41 -0700 | [diff] [blame] | 32 | GlobalVariables(); |
Thiago Farina | 676cb9f | 2016-10-06 11:00:43 +0000 | [diff] [blame] | 33 | |
michajlo | f74f9fe | 2018-01-29 09:06:44 -0800 | [diff] [blame] | 34 | // Whrere to write the server's JVM's output. Default value is |
| 35 | // <output_base>/server/jvm.out. |
| 36 | std::string jvm_log_file; |
| 37 | |
| 38 | // Whether or not the jvm_log_file should be opened with O_APPEND. |
| 39 | bool jvm_log_file_append; |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 40 | |
jingwen | 68c57f0 | 2018-11-21 16:17:17 -0800 | [diff] [blame] | 41 | // TODO(laszlocsomor) 2016-11-28: move pid_t usage out of here and wherever |
Laszlo Csomor | 3b89d2d | 2016-11-28 14:04:27 +0000 | [diff] [blame] | 42 | // else it appears. Find some way to not have to declare a pid_t here, either |
| 43 | // by making PID handling platform-independent or some other idea. |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 44 | pid_t server_pid; |
Nathan Harmata | bf98f39 | 2016-01-07 22:58:29 +0000 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | } // namespace blaze |
Thiago Farina | 319fd3a | 2016-01-14 19:42:24 +0000 | [diff] [blame] | 48 | |
Thiago Farina | 676cb9f | 2016-10-06 11:00:43 +0000 | [diff] [blame] | 49 | #endif // BAZEL_SRC_MAIN_CPP_GLOBAL_VARIABLES_H_ |