Skip to content

Commit f0787ed

Browse files
committed
[RISCV][docs] Explain Relaxation Default
As requested in follow-up comments on #108592.
1 parent 960c975 commit f0787ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/docs/RISCVUsage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ Some of the RISC-V psABI variants reserve ``gp`` (``x3``) for use as a "Global P
446446
To use this functionality, you need to be doing all of the following:
447447
* Use the ``medlow`` (aka ``small``) code model;
448448
* 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);
449-
* Compile your objects with Clang's ``-mrelax`` option, to enable relaxation annotations on relocatable objects;
449+
* 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);
450450
* Compile for a position-dependent static executable (not a shared library, and ``-fno-PIC`` / ``-fno-pic`` / ``-fno-pie``); and
451451
* Use LLD's ``--relax-gp`` option.
452452

0 commit comments

Comments
 (0)