[compiler-rt] 1791b11 - [Darwin] Fix lit substitution for mtargetos flag on darwin devices (#96953)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 29 11:06:06 PDT 2024
Author: thetruestblue
Date: 2024-06-29T11:06:03-07:00
New Revision: 1791b11b7d94d33a37897163702f5bfeb9a26f12
URL: https://github.com/llvm/llvm-project/commit/1791b11b7d94d33a37897163702f5bfeb9a26f12
DIFF: https://github.com/llvm/llvm-project/commit/1791b11b7d94d33a37897163702f5bfeb9a26f12.diff
LOG: [Darwin] Fix lit substitution for mtargetos flag on darwin devices (#96953)
Changes substitution logic to appropriately parse either format for min
deployment flag: -mtargetos={platform}{major}.{min){?-simulator} or
-m{platform}-{sim}-version-min={major}.{min} as the
apple_platform_min_deployment_target_flag.
rdar://130022065
Added:
Modified:
compiler-rt/test/lit.common.cfg.py
Removed:
################################################################################
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py
index 64b9a9d025e7b..70bf43e2fac59 100644
--- a/compiler-rt/test/lit.common.cfg.py
+++ b/compiler-rt/test/lit.common.cfg.py
@@ -586,21 +586,18 @@ def get_macos_aligned_version(macos_vers):
for vers in min_macos_deployment_target_substitutions:
flag = config.apple_platform_min_deployment_target_flag
major, minor = get_macos_aligned_version(vers)
- if "mtargetos" in flag:
+ apple_device = ""
+ sim = ""
+ if "target" in flag:
+ apple_device = config.apple_platform.split("sim")[0]
sim = "-simulator" if "sim" in config.apple_platform else ""
- config.substitutions.append(
- (
- "%%min_macos_deployment_target=%s.%s" % vers,
- "{}{}.{}{}".format(flag, major, minor, sim),
- )
- )
- else:
- config.substitutions.append(
- (
- "%%min_macos_deployment_target=%s.%s" % vers,
- "{}={}.{}".format(flag, major, minor),
- )
+
+ config.substitutions.append(
+ (
+ "%%min_macos_deployment_target=%s.%s" % vers,
+ "{}={}{}.{}{}".format(flag, apple_device, major, minor, sim),
)
+ )
else:
for vers in min_macos_deployment_target_substitutions:
config.substitutions.append(("%%min_macos_deployment_target=%s.%s" % vers, ""))
More information about the llvm-commits
mailing list