Add -C link-dead-code option r=alexcrichton
Turning gc-sections off improves code coverage based for tools which use DWARF debugging information (like kcov). Otherwise dead code is stripped and kcov returns a coverage percentage that doesn't reflect reality.
This commit is contained in:
parent
b9732ed147
commit
274f27a476
3 changed files with 12 additions and 1 deletions
|
|
@ -507,6 +507,8 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
|
|||
"system linker to link outputs with"),
|
||||
link_args: Option<Vec<String>> = (None, parse_opt_list,
|
||||
"extra arguments to pass to the linker (space separated)"),
|
||||
link_dead_code: bool = (false, parse_bool,
|
||||
"let the linker strip dead coded (turning it on can be used for code coverage)"),
|
||||
lto: bool = (false, parse_bool,
|
||||
"perform LLVM link-time optimizations"),
|
||||
target_cpu: Option<String> = (None, parse_opt_string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue