Unverified Commit 6a0c4401 authored by Fangrui Song's avatar Fangrui Song Committed by GitHub
Browse files

[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.)
parent 9095eec0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment