Add -Zvirtual-function-elimination flag

Adds the virtual-function-elimination unstable compiler flag and a check
that this flag is only used in combination with -Clto. LLVM can only
apply this optimization with fat LTO.
This commit is contained in:
flip1995 2022-04-21 13:29:45 +01:00 committed by Philipp Krones
parent da895e7938
commit def3fd8e92
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5
3 changed files with 10 additions and 6 deletions

View file

@ -1579,6 +1579,9 @@ options! {
"in general, enable more debug printouts (default: no)"),
verify_llvm_ir: bool = (false, parse_bool, [TRACKED],
"verify LLVM IR (default: no)"),
virtual_function_elimination: bool = (false, parse_bool, [TRACKED],
"enables dead virtual function elimination optimization. \
Requires `-Clto[=[fat,yes]]`"),
wasi_exec_model: Option<WasiExecModel> = (None, parse_wasi_exec_model, [TRACKED],
"whether to build a wasi command or reactor"),