[lit] Allow overriding each individual command.
diff --git a/lit.cfg b/lit.cfg
index 464ad64..0c7a0c8 100644
--- a/lit.cfg
+++ b/lit.cfg
@@ -151,13 +151,19 @@
# Find the tools we need.
lit_config.note("testing using 'FileCheck': %r" % (filecheck_path,))
-swift_path = os.path.join(package_path, "usr", "bin", "swift")
+swift_path = lit_config.params.get(
+ "swift",
+ os.path.join(package_path, "usr", "bin", "swift"))
lit_config.note("testing using 'swift': %r" % (swift_path,))
-swiftc_path = os.path.join(package_path, "usr", "bin", "swiftc")
+swiftc_path = lit_config.params.get(
+ "swiftc",
+ os.path.join(package_path, "usr", "bin", "swiftc"))
lit_config.note("testing using 'swiftc': %r" % (swiftc_path,))
-lldb_path = os.path.join(package_path, "usr", "bin", "lldb")
+lldb_path = lit_config.params.get(
+ "lldb",
+ os.path.join(package_path, "usr", "bin", "lldb"))
lit_config.note("testing using 'lldb': {}".format(lldb_path))
# Verify they exist.