Merge pull request #88245 from shana/simplify-mono-support-detection
C#: Let platforms signal if they support the mono module or not
This commit is contained in:
@ -1,8 +1,3 @@
|
|||||||
# Prior to .NET Core, we supported these: ["windows", "macos", "linuxbsd", "android", "web", "ios"]
|
|
||||||
# Eventually support for each them should be added back.
|
|
||||||
supported_platforms = ["windows", "macos", "linuxbsd", "android", "ios"]
|
|
||||||
|
|
||||||
|
|
||||||
def can_build(env, platform):
|
def can_build(env, platform):
|
||||||
if env["arch"].startswith("rv"):
|
if env["arch"].startswith("rv"):
|
||||||
return False
|
return False
|
||||||
@ -14,9 +9,10 @@ def can_build(env, platform):
|
|||||||
|
|
||||||
|
|
||||||
def configure(env):
|
def configure(env):
|
||||||
platform = env["platform"]
|
# Check if the platform has marked mono as supported.
|
||||||
|
supported = env.get("supported", [])
|
||||||
|
|
||||||
if platform not in supported_platforms:
|
if not "mono" in supported:
|
||||||
raise RuntimeError("This module does not currently support building for this platform")
|
raise RuntimeError("This module does not currently support building for this platform")
|
||||||
|
|
||||||
env.add_module_version_string("mono")
|
env.add_module_version_string("mono")
|
||||||
|
|||||||
@ -69,6 +69,7 @@ def get_flags():
|
|||||||
return [
|
return [
|
||||||
("arch", "arm64"), # Default for convenience.
|
("arch", "arm64"), # Default for convenience.
|
||||||
("target", "template_debug"),
|
("target", "template_debug"),
|
||||||
|
("supported", ["mono"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,7 @@ def get_flags():
|
|||||||
("arch", "arm64"), # Default for convenience.
|
("arch", "arm64"), # Default for convenience.
|
||||||
("target", "template_debug"),
|
("target", "template_debug"),
|
||||||
("use_volk", False),
|
("use_volk", False),
|
||||||
|
("supported", ["mono"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,7 @@ def get_doc_path():
|
|||||||
def get_flags():
|
def get_flags():
|
||||||
return [
|
return [
|
||||||
("arch", detect_arch()),
|
("arch", detect_arch()),
|
||||||
|
("supported", ["mono"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -56,6 +56,7 @@ def get_flags():
|
|||||||
return [
|
return [
|
||||||
("arch", detect_arch()),
|
("arch", detect_arch()),
|
||||||
("use_volk", False),
|
("use_volk", False),
|
||||||
|
("supported", ["mono"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -248,6 +248,7 @@ def get_flags():
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
("arch", arch),
|
("arch", arch),
|
||||||
|
("supported", ["mono"]),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user