diff options
author | Aaron Robinson <arobins@microsoft.com> | 2021-03-21 20:03:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-21 20:03:52 +0300 |
commit | 389674db062acc266da55401f406d872f5d5355f (patch) | |
tree | 82d28170759c923da317b22b36905851c82f2df9 /src/coreclr/hosts | |
parent | d64c11eabf313cbd52c2f83f89d5a63ad91ddca2 (diff) |
Remove unnecessary property setting in corerun. (#49950)
* Remove unnecessary property setting in corerun.
* Remove unused get_envvar_as_boolean()
Diffstat (limited to 'src/coreclr/hosts')
-rw-r--r-- | src/coreclr/hosts/corerun/corerun.cpp | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/coreclr/hosts/corerun/corerun.cpp b/src/coreclr/hosts/corerun/corerun.cpp index ed2f059b159..63390bde8d5 100644 --- a/src/coreclr/hosts/corerun/corerun.cpp +++ b/src/coreclr/hosts/corerun/corerun.cpp @@ -57,15 +57,6 @@ namespace envvar // Variable used to preload a mock hostpolicy for testing. const char_t* mockHostPolicy = W("MOCK_HOSTPOLICY"); - - // Name of the environment variable controlling server GC. - // If set to 1, server GC is enabled on startup. If 0, server GC is - // disabled. Server GC is off by default. - const char_t* serverGc = W("COMPlus_gcServer"); - - // Environment variable for setting whether or not to use Concurrent GC. - // On by default. - const char_t* concurrentGc = W("COMPlus_gcConcurrent"); } static void wait_for_debugger() @@ -155,18 +146,6 @@ static bool try_get_export(pal::mod_t mod, const char* symbol, void** fptr) return false; } -static const char* get_envvar_as_boolean(const char_t* var, bool def = false) -{ - string_t val = pal::getenv(var); - if (val.empty()) - val = def ? W("1") : W("0"); - - // CoreCLR expects strings "true" and "false" instead of "1" and "0". - return (val.compare(W("1")) == 0 || val.compare(W("true")) == 0 || val.compare(W("TRUE")) == 0) - ? "true" - : "false"; -} - class logger_t final { const char* _exePath; @@ -190,7 +169,7 @@ public: , _argv{ argv } { } - void dump_details(FILE* fd = stderr) + void dump_details(FILE* fd = stdout) { // Using std::fprintf since values have been converted to UTF-8. std::fprintf(fd, "Exe path: %s\n", _exePath); @@ -308,8 +287,6 @@ static int run(const configuration& config) pal::string_utf8_t app_path_utf8 = pal::convert_to_utf8(std::move(app_path)); pal::string_utf8_t app_path_ni_utf8 = pal::convert_to_utf8(std::move(app_path_ni)); pal::string_utf8_t native_search_dirs_utf8 = pal::convert_to_utf8(native_search_dirs.str()); - const char* enable_server_gc = get_envvar_as_boolean(envvar::serverGc); - const char* enable_concurrent_gc = get_envvar_as_boolean(envvar::concurrentGc, true /* default */); // Allowed property names: // @@ -330,8 +307,6 @@ static int run(const configuration& config) "APP_PATHS", "APP_NI_PATHS", "NATIVE_DLL_SEARCH_DIRECTORIES", - "System.GC.Server", - "System.GC.Concurrent", }; const char* propertyValues[] = @@ -344,10 +319,6 @@ static int run(const configuration& config) app_path_ni_utf8.c_str(), // NATIVE_DLL_SEARCH_DIRECTORIES native_search_dirs_utf8.c_str(), - // System.GC.Server - enable_server_gc, - // System.GC.Concurrent - enable_concurrent_gc, }; int propertyCount = (int)(sizeof(propertyKeys) / sizeof(propertyKeys[0])); |