aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp
diff options
context:
space:
mode:
authorGravatar Marian Lobur <loburm@google.com>2015-04-09 09:28:40 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-04-09 15:36:46 +0000
commit6dcdd6043a93a1e0011008957929bd1491a47a68 (patch)
tree8523df5ed9f3d32cfcad6c383d23732bca171c9d /src/main/cpp
parentccaada72c02d10e81cc52d4fdbfaa7fc1e694c5c (diff)
Add logging of blaze_cpu flag usage. Before we can remove this flag we need to be sure that no one uses it.
-- MOS_MIGRATED_REVID=90693216
Diffstat (limited to 'src/main/cpp')
-rw-r--r--src/main/cpp/blaze.cc4
-rw-r--r--src/main/cpp/blaze_startup_options.cc1
-rw-r--r--src/main/cpp/blaze_startup_options.h2
-rw-r--r--src/main/cpp/blaze_startup_options_common.cc4
4 files changed, 11 insertions, 0 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index 8b4f4e1f44..758f16207b 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -306,6 +306,10 @@ static vector<string> GetArgumentArray() {
if (!globals->options.skyframe.empty()) {
result.push_back("--skyframe=" + globals->options.skyframe);
}
+ if (globals->options.blaze_cpu) {
+ result.push_back("--blaze_cpu=true");
+ }
+
if (globals->options.allow_configurable_attributes) {
result.push_back("--allow_configurable_attributes");
}
diff --git a/src/main/cpp/blaze_startup_options.cc b/src/main/cpp/blaze_startup_options.cc
index 21636496c2..0bb1c0860d 100644
--- a/src/main/cpp/blaze_startup_options.cc
+++ b/src/main/cpp/blaze_startup_options.cc
@@ -50,6 +50,7 @@ BlazeStartupOptions::BlazeStartupOptions(const BlazeStartupOptions &rhs)
io_nice_level(rhs.io_nice_level),
max_idle_secs(rhs.max_idle_secs),
skyframe(rhs.skyframe),
+ blaze_cpu(rhs.blaze_cpu),
watchfs(rhs.watchfs),
allow_configurable_attributes(rhs.allow_configurable_attributes),
option_sources(rhs.option_sources),
diff --git a/src/main/cpp/blaze_startup_options.h b/src/main/cpp/blaze_startup_options.h
index 73b0405fb1..f848814c77 100644
--- a/src/main/cpp/blaze_startup_options.h
+++ b/src/main/cpp/blaze_startup_options.h
@@ -148,6 +148,8 @@ class BlazeStartupOptions {
string skyframe;
+ bool blaze_cpu;
+
// If true, Blaze will listen to OS-level file change notifications.
bool watchfs;
diff --git a/src/main/cpp/blaze_startup_options_common.cc b/src/main/cpp/blaze_startup_options_common.cc
index 7adf841016..f236b91354 100644
--- a/src/main/cpp/blaze_startup_options_common.cc
+++ b/src/main/cpp/blaze_startup_options_common.cc
@@ -42,6 +42,7 @@ void BlazeStartupOptions::Init() {
host_javabase = "";
batch = false;
batch_cpu_scheduling = false;
+ blaze_cpu = false;
allow_configurable_attributes = false;
fatal_event_bus_exceptions = false;
io_nice_level = -1;
@@ -76,6 +77,7 @@ void BlazeStartupOptions::Copy(
lhs->io_nice_level = rhs.io_nice_level;
lhs->max_idle_secs = rhs.max_idle_secs;
lhs->skyframe = rhs.skyframe;
+ lhs->blaze_cpu = rhs.blaze_cpu;
lhs->webstatus_port = rhs.webstatus_port;
lhs->watchfs = rhs.watchfs;
lhs->allow_configurable_attributes = rhs.allow_configurable_attributes;
@@ -130,6 +132,8 @@ blaze_exit_code::ExitCode BlazeStartupOptions::ProcessArg(
}
option_sources["host_jvm_args"] = rcfile; // NB: This is incorrect
} else if ((value = GetUnaryOption(arg, next_arg, "--blaze_cpu")) != NULL) {
+ blaze_cpu = true;
+ option_sources["blaze_cpu"] = rcfile;
fprintf(stderr, "WARNING: The --blaze_cpu startup option is now ignored "
"and will be removed in a future release\n");
} else if ((value = GetUnaryOption(arg, next_arg, "--blazerc")) != NULL) {