[Lldb-commits] [lldb] [lldb][test] Improve toolchain detection in Makefile.rules (PR #102185)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 28 11:53:38 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 907c7eb311077c5da434bf67858b1173a351d800...f9275093d59c73fe99a0079d06ed61532775385c lldb/packages/Python/lldbsuite/test/builders/builder.py lldb/test/API/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py lldb/test/API/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py lldb/test/API/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py lldb/test/API/functionalities/data-formatter/poarray/TestPrintObjectArray.py lldb/test/API/lang/objc/orderedset/TestOrderedSet.py lldb/test/API/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py lldb/test/API/macosx/simulator/TestSimulatorPlatform.py lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- packages/Python/lldbsuite/test/builders/builder.py 2024-08-28 18:48:51.000000 +0000
+++ packages/Python/lldbsuite/test/builders/builder.py 2024-08-28 18:53:05.824695 +0000
@@ -171,28 +171,28 @@
# Note: LLVM_AR is currently required by API TestBSDArchives.py tests.
# Assembly a full path to llvm-ar for given LLVM_TOOLS_DIR;
# otherwise assume we have llvm-ar at the same place where is CC specified.
if not os.getenv("LLVM_AR"):
llvm_ar = getLlvmUtil("llvm-ar")
- utils.extend(['LLVM_AR=%s' % llvm_ar])
+ utils.extend(["LLVM_AR=%s" % llvm_ar])
if not lldbplatformutil.platformIsDarwin():
if os.getenv("USE_LLVM_TOOLS"):
# Use the llvm project tool instead of the system defaults.
for var, name in util_names.items():
- utils.append('%s=%s' % (var, getLlvmUtil("llvm-" + name)))
- utils.extend(['AR=%s' % llvm_ar])
+ utils.append("%s=%s" % (var, getLlvmUtil("llvm-" + name)))
+ utils.extend(["AR=%s" % llvm_ar])
elif 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(name)
else:
util_paths[var] = os.getenv(var)
- utils.extend(['AR=%s' % util_paths["ARCHIVER"]])
+ 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"]):
@@ -201,18 +201,18 @@
util_paths["DWP"] = lldbutil.which("dwp")
if not util_paths["DWP"]:
del util_paths["DWP"]
for var, path in util_paths.items():
- utils.append('%s=%s' % (var, path))
+ utils.append("%s=%s" % (var, path))
else:
- utils.extend(['AR=%slibtool' % os.getenv("CROSS_COMPILE", "")])
+ utils.extend(["AR=%slibtool" % os.getenv("CROSS_COMPILE", "")])
return [
- 'CC=%s' % cc,
- 'CCC=%s' % cc_type,
- 'CXX=%s' % cxx,
+ "CC=%s" % cc,
+ "CCC=%s" % cc_type,
+ "CXX=%s" % cxx,
] + utils
return []
def getSDKRootSpec(self):
"""
``````````
</details>
https://github.com/llvm/llvm-project/pull/102185
More information about the lldb-commits
mailing list