C#: Replace libnethost dependency to find hostfxr

We want to replace libnethost as it gives us issues with some compilers.
Our implementation tries to mimic libnethost's hostfxr_resolver search
logic. We try to use the same function names for easier comparing in
case we need to update this in the future.
This commit is contained in:
Ignacio Roldán Etcheverry
2022-09-06 03:23:55 +02:00
parent 4b164b8e47
commit f784fb2000
11 changed files with 1045 additions and 390 deletions

View File

@ -4,23 +4,13 @@ supported_platforms = ["windows", "macos", "linuxbsd"]
def can_build(env, platform):
return not env["arch"].startswith("rv")
if env["arch"].startswith("rv"):
return False
if env["tools"]:
env.module_add_dependencies("mono", ["regex"])
def get_opts(platform):
from SCons.Variables import BoolVariable, PathVariable
default_mono_static = platform in ["ios", "web"]
default_mono_bundles_zlib = platform in ["web"]
return [
PathVariable(
"dotnet_root",
"Path to the .NET Sdk installation directory for the target platform and architecture",
"",
PathVariable.PathAccept,
),
]
return True
def configure(env):