Skip to content

Commit 646e41f

Browse files
committed
Revert "Use cmd arguments instead of env variables in builder"
This reverts commit 55b981cb0fcb4c2d3b62d8412b507afedd8801da.
1 parent 0086b9b commit 646e41f

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def getToolchainSpec(self, compiler):
153153
cc_dir = cc_path.parent
154154

155155
def getLlvmUtil(util_name):
156-
return os.path.join(configuration.llvm_tools_dir, util_name + exe_ext)
156+
llvm_tools_dir = os.getenv("LLVM_TOOLS_DIR", cc_dir)
157+
return os.path.join(llvm_tools_dir, util_name + exe_ext)
157158

158159
def getToolchainUtil(util_name):
159160
return cc_dir / (cc_prefix + util_name + cc_ext)
@@ -176,7 +177,7 @@ def getToolchainUtil(util_name):
176177
utils.extend(["LLVM_AR=%s" % llvm_ar])
177178

178179
if not lldbplatformutil.platformIsDarwin():
179-
if configuration.use_llvm_tools:
180+
if os.getenv("USE_LLVM_TOOLS"):
180181
# Use the llvm project tool instead of the system defaults.
181182
for var, name in util_names.items():
182183
utils.append("%s=%s" % (var, getLlvmUtil("llvm-" + name)))

lldb/packages/Python/lldbsuite/test/configuration.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@
118118
# same base name.
119119
all_tests = set()
120120

121-
# Force use llvm tools in API tests
122-
use_llvm_tools = False
123-
# Path to LLVM tools to be used by tests.
124-
llvm_tools_dir = None
125-
126121
# LLDB library directory.
127122
lldb_libs_dir = None
128123
lldb_obj_root = None

lldb/packages/Python/lldbsuite/test/dotest.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,7 @@ def parseOptionsAndInitTestdirs():
279279
configuration.dsymutil = seven.get_command_output(
280280
"xcrun -find -toolchain default dsymutil"
281281
)
282-
283-
if args.use_llvm_tools:
284-
configuration.use_llvm_tools = True
285282
if args.llvm_tools_dir:
286-
configuration.llvm_tools_dir = args.llvm_tools_dir
287283
configuration.filecheck = shutil.which("FileCheck", path=args.llvm_tools_dir)
288284
configuration.yaml2obj = shutil.which("yaml2obj", path=args.llvm_tools_dir)
289285

lldb/packages/Python/lldbsuite/test/dotest_args.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,12 @@ def create_parser():
108108
dest="dsymutil",
109109
help=textwrap.dedent("Specify which dsymutil to use."),
110110
)
111-
group.add_argument(
112-
"--use-llvm-tools",
113-
dest="use_llvm_tools",
114-
action="store_true",
115-
help=textwrap.dedent(
116-
"Force use LLVM tools for testing (llvm-ar, llvm-objcopy, etc.)."
117-
),
118-
)
119111
group.add_argument(
120112
"--llvm-tools-dir",
121113
metavar="dir",
122114
dest="llvm_tools_dir",
123115
help=textwrap.dedent(
124-
"The location of llvm tools used for testing (llvm-ar, yaml2obj, FileCheck, etc.)."
116+
"The location of llvm tools used for testing (yaml2obj, FileCheck, etc.)."
125117
),
126118
)
127119

0 commit comments

Comments
 (0)