Skip to content

Commit e57ab30

Browse files
committed
[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 (cherry picked from commit 2c35073)
1 parent ff20ea9 commit e57ab30

File tree

1 file changed

+13
-8
lines changed
  • lldb/packages/Python/lldbsuite/test/builders

1 file changed

+13
-8
lines changed

lldb/packages/Python/lldbsuite/test/builders/darwin.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,20 @@ def get_triple():
5454
return vendor, os, version, env
5555

5656

57+
def get_triple_str(arch, vendor, os, version, env):
58+
if None in [arch, vendor, os, version, env]:
59+
return None
60+
61+
component = [arch, vendor, os + version]
62+
if env:
63+
components.append(env)
64+
return '-'.join(component)
65+
66+
5767
class BuilderDarwin(Builder):
5868
def getTriple(self, arch):
5969
vendor, os, version, env = get_triple()
60-
components = [arch, vendor, os, version, env]
61-
if None in components:
62-
return None
63-
return '-'.join(components)
70+
return get_triple_str(arch, vendor, os, version, env)
6471

6572
def getExtraMakeArgs(self):
6673
"""
@@ -95,12 +102,10 @@ def getArchCFlags(self, arch):
95102
"""Returns the ARCH_CFLAGS for the make system."""
96103
# Get the triple components.
97104
vendor, os, version, env = get_triple()
98-
if vendor is None or os is None or version is None or env is None:
105+
triple = get_triple_str(arch, vendor, os, version, env)
106+
if not triple:
99107
return ""
100108

101-
# Construct the triple from its components.
102-
triple = '-'.join([arch, vendor, os, version, env])
103-
104109
# Construct min version argument
105110
version_min = ""
106111
if env == "simulator":

0 commit comments

Comments
 (0)