Skip to content

[lldb] The os and version are not separate components in the triple #3480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions lldb/packages/Python/lldbsuite/test/builders/darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -95,12 +102,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":
Expand Down