Refael Ackermann authored and Anna Henningsen committed 2019-02-01 16:22:07 +01:00
1 parent b1e0c43abd
commit 998cea567f
1 file changed
+14 -10
+14 -10
View File
@@ -107,6 +107,20 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) {
namespace options_parser {
// Explicitly access the singelton instances in their dependancy order.
// This was moved here to workaround a compiler bug.
// Refs: https://github.com/nodejs/node/issues/25593
#if HAVE_INSPECTOR
const DebugOptionsParser DebugOptionsParser::instance;
#endif // HAVE_INSPECTOR
const EnvironmentOptionsParser EnvironmentOptionsParser::instance;
const PerIsolateOptionsParser PerIsolateOptionsParser::instance;
const PerProcessOptionsParser PerProcessOptionsParser::instance;
// XXX: If you add an option here, please also add it to doc/node.1 and
// doc/api/cli.md
// TODO(addaleax): Make that unnecessary.
@@ -143,10 +157,6 @@ DebugOptionsParser::DebugOptionsParser() {
AddAlias("--debug-brk=", { "--inspect-port", "--debug-brk" });
}
#if HAVE_INSPECTOR
const DebugOptionsParser DebugOptionsParser::instance;
#endif // HAVE_INSPECTOR
EnvironmentOptionsParser::EnvironmentOptionsParser() {
AddOption("--experimental-modules",
"experimental ES Module support and caching modules",
@@ -275,8 +285,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
#endif // HAVE_INSPECTOR
}
const EnvironmentOptionsParser EnvironmentOptionsParser::instance;
PerIsolateOptionsParser::PerIsolateOptionsParser() {
AddOption("--track-heap-objects",
"track heap object allocations for heap snapshots",
@@ -334,8 +342,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser() {
&PerIsolateOptions::get_per_env_options);
}
const PerIsolateOptionsParser PerIsolateOptionsParser::instance;
PerProcessOptionsParser::PerProcessOptionsParser() {
AddOption("--title",
"the process title to use on startup",
@@ -442,8 +448,6 @@ PerProcessOptionsParser::PerProcessOptionsParser() {
&PerProcessOptions::get_per_isolate_options);
}
const PerProcessOptionsParser PerProcessOptionsParser::instance;
inline std::string RemoveBrackets(const std::string& host) {
if (!host.empty() && host.front() == '[' && host.back() == ']')
return host.substr(1, host.size() - 2);