summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-02-19 00:08:07 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-02-19 00:08:07 +0100
commit033821c59576aa1286441aa3a224e2b16c1818e3 (patch)
tree8faecd2b582bb57f8e2397ae566c71f7da69a7e0
parent0f0515a75fec37b2a4af70760c9be99cea781198 (diff)
parent21e524a798bf3c3728f63657ff2e7a79f6de9ee6 (diff)
downloadredot-engine-033821c59576aa1286441aa3a224e2b16c1818e3.tar.gz
Merge pull request #88245 from shana/simplify-mono-support-detection
C#: Let platforms signal if they support the mono module or not
-rw-r--r--modules/mono/config.py10
-rw-r--r--platform/android/detect.py1
-rw-r--r--platform/ios/detect.py1
-rw-r--r--platform/linuxbsd/detect.py1
-rw-r--r--platform/macos/detect.py1
-rw-r--r--platform/windows/detect.py1
6 files changed, 8 insertions, 7 deletions
diff --git a/modules/mono/config.py b/modules/mono/config.py
index 859d77b262..3d087c9e27 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -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):
if env["arch"].startswith("rv"):
return False
@@ -14,9 +9,10 @@ def can_build(env, platform):
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")
env.add_module_version_string("mono")
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 98b3ecdeff..fea8ec3287 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -69,6 +69,7 @@ def get_flags():
return [
("arch", "arm64"), # Default for convenience.
("target", "template_debug"),
+ ("supported", ["mono"]),
]
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index 9f929ddf0a..4d6e3ae9ba 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -51,6 +51,7 @@ def get_flags():
("arch", "arm64"), # Default for convenience.
("target", "template_debug"),
("use_volk", False),
+ ("supported", ["mono"]),
]
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 8fbd8b10b1..4856076436 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -67,6 +67,7 @@ def get_doc_path():
def get_flags():
return [
("arch", detect_arch()),
+ ("supported", ["mono"]),
]
diff --git a/platform/macos/detect.py b/platform/macos/detect.py
index cfbe9a8ee7..9150a527a5 100644
--- a/platform/macos/detect.py
+++ b/platform/macos/detect.py
@@ -56,6 +56,7 @@ def get_flags():
return [
("arch", detect_arch()),
("use_volk", False),
+ ("supported", ["mono"]),
]
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index f536c1ac27..4585884859 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -248,6 +248,7 @@ def get_flags():
return [
("arch", arch),
+ ("supported", ["mono"]),
]