Update linker-plugin-lto.md

This commit is contained in:
Nicolas 2021-12-20 16:46:09 -03:00 committed by GitHub
parent 7430a55708
commit 55b6108160
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,13 +105,13 @@ clang-cl --version
If you are compiling any proc-macros, you will get this error:
```
error: Linker plugin based LTO is not supported together with `-C prefer-dynamic` when
error: Linker plugin based LTO is not supported together with `-C prefer-dynamic` when
targeting Windows-like targets
```
This is fixed if you explicitly set the target, for example
This is fixed if you explicitly set the target, for example
`cargo build --target x86_64-pc-windows-msvc`
Without an explicit --target the flags will be passed to all compiler invocations (including build
Without an explicit --target the flags will be passed to all compiler invocations (including build
scripts and proc macros), see [cargo docs on rustflags](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags)
If you have dependencies using the `cc` crate, you will need to set these