[llvm] [BOLT] Restore -relax-plt as a deprecated no-op option (PR #230729)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 21:15:48 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Rafael Auler (rafaelauler)

<details>
<summary>Changes</summary>

c6ee71d5e8a5 removed -relax-plt from the AArch64 relaxation pass, which makes llvm-bolt reject existing command lines that still pass it. Re-add the option as a hidden no-op that only prints a deprecation warning, so scripts using it keep working.

---
Full diff: https://github.com/llvm/llvm-project/pull/230729.diff


1 Files Affected:

- (modified) bolt/lib/Passes/LongJmp.cpp (+7) 


``````````diff
diff --git a/bolt/lib/Passes/LongJmp.cpp b/bolt/lib/Passes/LongJmp.cpp
index 2f523280f338fc..a2a11d8a27a311 100644
--- a/bolt/lib/Passes/LongJmp.cpp
+++ b/bolt/lib/Passes/LongJmp.cpp
@@ -50,6 +50,13 @@ static cl::opt<unsigned> MaxThunkChainLength(
     "max-thunk-chain-length",
     cl::desc("maximum number of B-only thunks to use for call relaxation"),
     cl::init(1), cl::Hidden, cl::cat(BoltOptCategory));
+
+static cl::opt<bool> DeprecatedRelaxPLT(
+    "relax-plt", cl::desc("deprecated, has no effect"), cl::init(true),
+    cl::callback([](const bool &) {
+      errs() << "BOLT-WARNING: '-relax-plt' is deprecated and has no effect\n";
+    }),
+    cl::Hidden, cl::cat(BoltOptCategory));
 }
 
 namespace llvm {

``````````

</details>


https://github.com/llvm/llvm-project/pull/230729


More information about the llvm-commits mailing list