[PUSHED] doc, sanitizer: Document -static-libhwasan [PR124170]

Message ID 20260407163604.779109-1-sloosemore@baylibre.com
State New
Headers
Series [PUSHED] doc, sanitizer: Document -static-libhwasan [PR124170] |

Commit Message

Sandra Loosemore April 7, 2026, 4:36 p.m. UTC
  gcc/ChangeLog
	PR sanitizer/124170
	* doc/invoke.texi (Option Summary) <Linker Options>: Add
	-static-libhwasan and fix alphabetization of similar options.
	(Link Options): Likewise.
	* common.opt.urls: Regenerated.
---
 gcc/common.opt.urls |  3 +++
 gcc/doc/invoke.texi | 27 +++++++++++++++++++--------
 2 files changed, 22 insertions(+), 8 deletions(-)
  

Patch

diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls
index b316954a98e..25ddc584171 100644
--- a/gcc/common.opt.urls
+++ b/gcc/common.opt.urls
@@ -2246,6 +2246,9 @@  UrlSuffix(gcc/Link-Options.html#index-static-libstdc_002b_002b)
 static-libasan
 UrlSuffix(gcc/Link-Options.html#index-static-libasan)
 
+static-libhwasan
+UrlSuffix(gcc/Link-Options.html#index-static-libhwasan)
+
 static-libtsan
 UrlSuffix(gcc/Link-Options.html#index-static-libtsan)
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index b01787d29fc..d02743301ff 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -769,7 +769,8 @@  Objective-C and Objective-C++ Dialects}.
 -e @var{entry}
 -pie  -pthread  -r  -rdynamic
 -s  -static  -static-pie  -static-libgcc  -static-libstdc++
--static-libasan  -static-libtsan  -static-liblsan  -static-libubsan
+-static-libasan  -static-libhwasan  -static-liblsan
+-static-libtsan  -static-libubsan
 -shared  -shared-libgcc  -symbolic
 -T @var{script}  -Wl,@var{option}  -Xlinker @var{option}
 -u @var{symbol}
@@ -18699,14 +18700,14 @@  option is not used, then this links against the shared version of
 driver to link @file{libasan} statically, without necessarily linking
 other libraries statically.
 
-@opindex static-libtsan
-@item -static-libtsan
-When the @option{-fsanitize=thread} option is used to link a program,
-the GCC driver automatically links against @option{libtsan}.  If
-@file{libtsan} is available as a shared library, and the @option{-static}
+@opindex static-libhwasan
+@item -static-libhwasan
+When the @option{-fsanitize=hwaddress} option is used to link a program,
+the GCC driver automatically links against @option{libhwasan}.  If
+@file{libhwasan} is available as a shared library, and the @option{-static}
 option is not used, then this links against the shared version of
-@file{libtsan}.  The @option{-static-libtsan} option directs the GCC
-driver to link @file{libtsan} statically, without necessarily linking
+@file{libhwasan}.  The @option{-static-libhwasan} option directs the GCC
+driver to link @file{libhwasan} statically, without necessarily linking
 other libraries statically.
 
 @opindex static-liblsan
@@ -18719,6 +18720,16 @@  option is not used, then this links against the shared version of
 driver to link @file{liblsan} statically, without necessarily linking
 other libraries statically.
 
+@opindex static-libtsan
+@item -static-libtsan
+When the @option{-fsanitize=thread} option is used to link a program,
+the GCC driver automatically links against @option{libtsan}.  If
+@file{libtsan} is available as a shared library, and the @option{-static}
+option is not used, then this links against the shared version of
+@file{libtsan}.  The @option{-static-libtsan} option directs the GCC
+driver to link @file{libtsan} statically, without necessarily linking
+other libraries statically.
+
 @opindex static-libubsan
 @item -static-libubsan
 When the @option{-fsanitize=undefined} option is used to link a program,