[all-commits] [llvm/llvm-project] 6a0c44: [Driver, sanitizer] Remove RequiresPIE and msan's N...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Thu Jan 11 18:30:28 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6a0c440159aa2b2e895fe6e04af39c91e54733ce
https://github.com/llvm/llvm-project/commit/6a0c440159aa2b2e895fe6e04af39c91e54733ce
Author: Fangrui Song <i at maskray.me>
Date: 2024-01-11 (Thu, 11 Jan 2024)
Changed paths:
M clang/lib/Driver/SanitizerArgs.cpp
Log Message:
-----------
[Driver,sanitizer] Remove RequiresPIE and msan's NeedPIE setting (#77689)
The two variables cause clang to default to -fPIE when no PIC/PIC option
is
specified.
msan used to require PIE because many `kMemoryLayout` made the low
address (used by ET_EXEC executables) invalid. Current msan.h no longer
does so, rendering this PIE requirement unneeded. The same argument
applies to -fsanitize=dataflow.
On Linux, most builds set CLANG_DEFAULT_PIE_ON_LINUX to 1, making
`RequiresPIE/NeedPIE` redundant on Linux.
(`NeedPIE` is not removed for now due to the -fsanitize-cfi-cross-dso
comment. If it's indeed incompatible with explicit -fno-pic, a warning
is probably better.)
More information about the All-commits
mailing list