[llvm] f0787ed - [RISCV][docs] Explain Relaxation Default
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 10:54:06 PDT 2024
Author: Sam Elliott
Date: 2024-09-16T10:52:25-07:00
New Revision: f0787edc5e38e5ce7d180802e2c4d920e9253c56
URL: https://github.com/llvm/llvm-project/commit/f0787edc5e38e5ce7d180802e2c4d920e9253c56
DIFF: https://github.com/llvm/llvm-project/commit/f0787edc5e38e5ce7d180802e2c4d920e9253c56.diff
LOG: [RISCV][docs] Explain Relaxation Default
As requested in follow-up comments on #108592.
Added:
Modified:
llvm/docs/RISCVUsage.rst
Removed:
################################################################################
diff --git a/llvm/docs/RISCVUsage.rst b/llvm/docs/RISCVUsage.rst
index d51b1c35137222..8fa9e21981fb86 100644
--- a/llvm/docs/RISCVUsage.rst
+++ b/llvm/docs/RISCVUsage.rst
@@ -446,7 +446,7 @@ Some of the RISC-V psABI variants reserve ``gp`` (``x3``) for use as a "Global P
To use this functionality, you need to be doing all of the following:
* Use the ``medlow`` (aka ``small``) code model;
* Not use the ``gp`` register for any other uses (some platforms use it for the shadow stack and others as a temporary -- as denoted by the ``Tag_RISCV_x3_reg_usage`` build attribute);
-* Compile your objects with Clang's ``-mrelax`` option, to enable relaxation annotations on relocatable objects;
+* Compile your objects with Clang's ``-mrelax`` option, to enable relaxation annotations on relocatable objects (this is the default, but ``-mno-relax`` disables these relaxation annotations);
* Compile for a position-dependent static executable (not a shared library, and ``-fno-PIC`` / ``-fno-pic`` / ``-fno-pie``); and
* Use LLD's ``--relax-gp`` option.
More information about the llvm-commits
mailing list