[llvm] MC: Refine ALIGN relocation conditions (PR #150816)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 7 11:33:34 PDT 2025


================
@@ -32,6 +32,11 @@ static cl::opt<bool> ULEB128Reloc(
     "riscv-uleb128-reloc", cl::init(true), cl::Hidden,
     cl::desc("Emit R_RISCV_SET_ULEB128/E_RISCV_SUB_ULEB128 if appropriate"));
 
+static cl::opt<bool>
+    AlignRvc("riscv-align-rvc", cl::init(true), cl::Hidden,
+             cl::desc("When generating R_RISCV_ALIGN, insert $alignment-2 "
+                      "bytes of NOPs even in norvc code"));
----------------
lenary wrote:

Is the intention to get rid of this once all the tests can be updated? I don't mind either way, it's just good to know for future reference.

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


More information about the llvm-commits mailing list