diff options
author | Fangrui Song <i@maskray.me> | 2021-11-30 11:06:28 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-11-30 11:06:28 -0800 |
commit | 8c3641d03ec0cb0e8730cad349b54d67581b4c73 (patch) | |
tree | 04b4e1588da1e281a2cb528cf5da359a98f9b354 /llvm/lib/Support/CommandLine.cpp | |
parent | 299cec3c51a9bbe4683825c9aac86551733d689d (diff) | |
download | llvm-8c3641d03ec0cb0e8730cad349b54d67581b4c73.zip llvm-8c3641d03ec0cb0e8730cad349b54d67581b4c73.tar.gz llvm-8c3641d03ec0cb0e8730cad349b54d67581b4c73.tar.bz2 |
[ELF] Change -z unknown from error to warning
There is a trend of having more optional options (usually security
hardening related) like -z cet-report=, -z bti-report=, -z force-bti.
If ld.lld 14.0.0 uses a warning, in 15/16/17/... timeframe when people
add new options to software, they can worry less about linker errors on ld.lld 14.0.0.
In some cases `-z foo` does essential work where a silent ignore can be
problematic, but the user has received a warning. From my observation, the
doing-essential-work `-z foo` is much fewer than the converse. In addition,
the user who cares can use `--fatal-warnings` (Note: GNU ld doesn't upgrade warnings to errors).
It is unclear whether we need something like `clang -Wunknown-warning-option`.
If we ever run into unfortunate transition like `-z start-stop-gc`, the
affected software (e.g. ldc is a compiler which passes linker options to the underlying ld)
can blindly add the `-z` option, without worrying it may cause a linker error to LLD 14.0.0.
Reviewed By: jrtc27, peter.smith
Differential Revision: https://reviews.llvm.org/D114748
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions