Use environment variable to disable Server GC
This commit is contained in:
parent
d1a257bff7
commit
3d6623c20c
1 changed files with 6 additions and 2 deletions
|
@ -105,7 +105,7 @@ int run(const arguments_t& args, const pal::string_t& clr_path)
|
|||
"PLATFORM_RESOURCE_ROOTS",
|
||||
"AppDomainCompatSwitch",
|
||||
// TODO: pipe this from corehost.json
|
||||
"SERVER_GC"
|
||||
"SERVER_GC",
|
||||
};
|
||||
|
||||
auto tpa_paths_cstr = pal::to_stdstring(probe_paths.tpa);
|
||||
|
@ -113,6 +113,10 @@ int run(const arguments_t& args, const pal::string_t& clr_path)
|
|||
auto native_dirs_cstr = pal::to_stdstring(probe_paths.native);
|
||||
auto culture_dirs_cstr = pal::to_stdstring(probe_paths.culture);
|
||||
|
||||
// Workaround for dotnet/cli Issue #488 and #652
|
||||
pal::string_t server_gc;
|
||||
std::string server_gc_cstr = (pal::getenv(_X("COREHOST_SERVER_GC"), &server_gc)) ? pal::to_stdstring(server_gc) : "1";
|
||||
|
||||
const char* property_values[] = {
|
||||
// TRUSTED_PLATFORM_ASSEMBLIES
|
||||
tpa_paths_cstr.c_str(),
|
||||
|
@ -127,7 +131,7 @@ int run(const arguments_t& args, const pal::string_t& clr_path)
|
|||
// AppDomainCompatSwitch
|
||||
"UseLatestBehaviorWhenTFMNotSpecified",
|
||||
// SERVER_GC
|
||||
"1"
|
||||
server_gc_cstr.c_str(),
|
||||
};
|
||||
|
||||
size_t property_size = sizeof(property_keys) / sizeof(property_keys[0]);
|
||||
|
|
Loading…
Reference in a new issue