Skip to content

Commit 2c35073

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
1 parent 20675d8 commit 2c35073

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
"""
@@ -93,12 +100,10 @@ def getArchCFlags(self, arch):
93100
"""Returns the ARCH_CFLAGS for the make system."""
94101
# Get the triple components.
95102
vendor, os, version, env = get_triple()
96-
if vendor is None or os is None or version is None or env is None:
103+
triple = get_triple_str(arch, vendor, os, version, env)
104+
if not triple:
97105
return []
98106

99-
# Construct the triple from its components.
100-
triple = '-'.join([arch, vendor, os, version, env])
101-
102107
# Construct min version argument
103108
version_min = ""
104109
if env == "simulator":

0 commit comments

Comments
 (0)