[PATCH] D129684: [test] Fix macOS triple check
Ben Langmuir via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 13 13:36:43 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG904422457564: [test] Fix macOS triple check (authored by benlangmuir).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129684/new/
https://reviews.llvm.org/D129684
Files:
llvm/utils/lit/lit/util.py
Index: llvm/utils/lit/lit/util.py
===================================================================
--- llvm/utils/lit/lit/util.py
+++ llvm/utils/lit/lit/util.py
@@ -385,10 +385,17 @@
return out, err, exitCode
+def isMacOSTriple(target_triple):
+ """Whether the given target triple is for macOS,
+ e.g. x86_64-apple-darwin, arm64-apple-macos
+ """
+ return 'darwin' in target_triple or 'macos' in target_triple
+
+
def usePlatformSdkOnDarwin(config, lit_config):
# On Darwin, support relocatable SDKs by providing Clang with a
# default system root path.
- if 'darwin' in config.target_triple:
+ if isMacOSTriple(config.target_triple):
try:
cmd = subprocess.Popen(['xcrun', '--show-sdk-path', '--sdk', 'macosx'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -404,7 +411,7 @@
def findPlatformSdkVersionOnMacOS(config, lit_config):
- if 'darwin' in config.target_triple:
+ if isMacOSTriple(config.target_triple):
try:
cmd = subprocess.Popen(['xcrun', '--show-sdk-version', '--sdk', 'macosx'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129684.444409.patch
Type: text/x-patch
Size: 1215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220713/e5ed2d36/attachment.bin>
More information about the llvm-commits
mailing list