[Lldb-commits] [lldb] 2c35073 - [lldb] The os and version are not separate components in the triple
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 27 16:40:24 PDT 2021
Author: Jonas Devlieghere
Date: 2021-10-27T16:40:20-07:00
New Revision: 2c350730ca8b75727188139f033a7bd60d9383c7
URL: https://github.com/llvm/llvm-project/commit/2c350730ca8b75727188139f033a7bd60d9383c7
DIFF: https://github.com/llvm/llvm-project/commit/2c350730ca8b75727188139f033a7bd60d9383c7.diff
LOG: [lldb] The os and version are not separate components in the triple
Create a valid triple in the Darwin builder. Currently it was
incorrectly treating the os and version as two separate components in
the triple.
Differential revision: https://reviews.llvm.org/D112676
Added:
Modified:
lldb/packages/Python/lldbsuite/test/builders/darwin.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/builders/darwin.py b/lldb/packages/Python/lldbsuite/test/builders/darwin.py
index e182f2d70b02..6e5ba391a7b7 100644
--- a/lldb/packages/Python/lldbsuite/test/builders/darwin.py
+++ b/lldb/packages/Python/lldbsuite/test/builders/darwin.py
@@ -54,13 +54,20 @@ def get_triple():
return vendor, os, version, env
+def get_triple_str(arch, vendor, os, version, env):
+ if None in [arch, vendor, os, version, env]:
+ return None
+
+ component = [arch, vendor, os + version]
+ if env:
+ components.append(env)
+ return '-'.join(component)
+
+
class BuilderDarwin(Builder):
def getTriple(self, arch):
vendor, os, version, env = get_triple()
- components = [arch, vendor, os, version, env]
- if None in components:
- return None
- return '-'.join(components)
+ return get_triple_str(arch, vendor, os, version, env)
def getExtraMakeArgs(self):
"""
@@ -93,12 +100,10 @@ def getArchCFlags(self, arch):
"""Returns the ARCH_CFLAGS for the make system."""
# Get the triple components.
vendor, os, version, env = get_triple()
- if vendor is None or os is None or version is None or env is None:
+ triple = get_triple_str(arch, vendor, os, version, env)
+ if not triple:
return []
- # Construct the triple from its components.
- triple = '-'.join([arch, vendor, os, version, env])
-
# Construct min version argument
version_min = ""
if env == "simulator":
More information about the lldb-commits
mailing list