[lld] lld: Add initial support for GNU LTO format (PR #157175)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 14:06:21 PDT 2025
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 origin/main...HEAD lld/test/lit.cfg.py
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lit.cfg.py 2025-09-05 20:54:25.000000 +0000
+++ lit.cfg.py 2025-09-05 21:05:51.530316 +0000
@@ -181,22 +181,24 @@
# ELF tests expect the default target for ld.lld to be ELF.
if config.ld_lld_default_mingw:
config.excludes.append("ELF")
+
def prepend_path(path):
- target_arch = getattr(config, 'target_arch', None)
- name = 'PATH'
- if config.operating_system == 'Windows':
- sep = ';'
+ target_arch = getattr(config, "target_arch", None)
+ name = "PATH"
+ if config.operating_system == "Windows":
+ sep = ";"
else:
- sep = ':'
+ sep = ":"
if name in config.environment:
config.environment[name] = path + sep + config.environment[name]
else:
config.environment[name] = path
+
gcc_executable = lit.util.which("gcc", config.environment["PATH"])
if gcc_executable:
config.available_features.add("gcc")
if config.has_gnu_lto:
``````````
</details>
https://github.com/llvm/llvm-project/pull/157175
More information about the llvm-commits
mailing list