diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/builders/builder.py')
| -rw-r--r-- | lldb/packages/Python/lldbsuite/test/builders/builder.py | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/builders/builder.py b/lldb/packages/Python/lldbsuite/test/builders/builder.py index f813d68e46e8..de0573246944 100644 --- a/lldb/packages/Python/lldbsuite/test/builders/builder.py +++ b/lldb/packages/Python/lldbsuite/test/builders/builder.py @@ -10,6 +10,7 @@ import lldbsuite.test.lldbplatformutil as lldbplatformutil import lldbsuite.test.lldbutil as lldbutil from lldbsuite.test import configuration from lldbsuite.test_event import build_exception +from lldbsuite.support import seven class Builder: @@ -169,31 +170,34 @@ class Builder: if not os.getenv("LLVM_AR"): utils.extend(["LLVM_AR=%s" % getToolchainUtil("llvm-ar")]) - if not lldbplatformutil.platformIsDarwin(): - if cc_type in ["clang", "cc", "gcc"]: - util_paths = {} - # Assembly a toolchain side tool cmd based on passed CC. - for var, name in util_names.items(): - # Do not override explicity specified tool from the cmd line. - if not os.getenv(var): - util_paths[var] = getToolchainUtil("llvm-" + name) - else: - util_paths[var] = os.getenv(var) - utils.extend(["AR=%s" % util_paths["ARCHIVER"]]) - - # Look for llvm-dwp or gnu dwp - if not lldbutil.which(util_paths["DWP"]): - util_paths["DWP"] = getToolchainUtil("llvm-dwp") - if not lldbutil.which(util_paths["DWP"]): - util_paths["DWP"] = lldbutil.which("llvm-dwp") + if cc_type in ["clang", "cc", "gcc"]: + util_paths = {} + # Assembly a toolchain side tool cmd based on passed CC. + for var, name in util_names.items(): + # Do not override explicity specified tool from the cmd line. + if not os.getenv(var): + util_paths[var] = getToolchainUtil("llvm-" + name) + else: + util_paths[var] = os.getenv(var) + utils.extend(["AR=%s" % util_paths["ARCHIVER"]]) + + # Look for llvm-dwp or gnu dwp + if not lldbutil.which(util_paths["DWP"]): + util_paths["DWP"] = getToolchainUtil("llvm-dwp") + if not lldbutil.which(util_paths["DWP"]): + util_paths["DWP"] = lldbutil.which("llvm-dwp") + if not util_paths["DWP"]: + util_paths["DWP"] = lldbutil.which("dwp") if not util_paths["DWP"]: - util_paths["DWP"] = lldbutil.which("dwp") - if not util_paths["DWP"]: - del util_paths["DWP"] + del util_paths["DWP"] - for var, path in util_paths.items(): - utils.append("%s=%s" % (var, path)) - else: + if lldbplatformutil.platformIsDarwin(): + util_paths["STRIP"] = seven.get_command_output("xcrun -f strip") + + for var, path in util_paths.items(): + utils.append("%s=%s" % (var, path)) + + if lldbplatformutil.platformIsDarwin(): utils.extend(["AR=%slibtool" % os.getenv("CROSS_COMPILE", "")]) return [ |
