mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
Allow rust binaries to remove dead code
Note: we may need to add a special init function to stop linker based dead code elimination. That or special linker commands to keep `roc_*` functions. Currently this is working on my x86 machine without it though. Guide here if needed on the init function: https://stackoverflow.com/questions/43712979/how-to-export-a-symbol-from-a-rust-executable
This commit is contained in:
parent
8f210241ab
commit
d0e1da40ac
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ pub fn rebuild_host(
|
|||
let rust_flags = if cfg!(windows) {
|
||||
"-Z export-executable-symbols"
|
||||
} else {
|
||||
"-C link-dead-code"
|
||||
"-C link-args=-rdynamic"
|
||||
};
|
||||
cargo_cmd.env("RUSTFLAGS", rust_flags);
|
||||
cargo_cmd.args(["--bin", "host"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue