alexcrichton / xz2-rs

Bindings to liblzma in Rust (xz streams in Rust)
Apache License 2.0
81 stars 52 forks source link

Enable thin LTO for `lzma-sys` #98

Closed NobodyXu closed 2 years ago

NobodyXu commented 2 years ago

Fat LTO usually can reduce binary size while improving the performance. Thin LTO does the same, but taking less time.

Signed-off-by: Jiahao XU Jiahao_XU@outlook.com

NobodyXu commented 2 years ago

warning: the following packages contain code that will be rejected by a future version of Rust: winapi v0.2.8
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running unittests src\lib.rs (target\debug\deps\xz2-4a223ec7b5607790.exe)
error: test failed, to rerun pass '--lib'
Caused by:
  could not execute process `D:\a\xz2-rs\xz2-rs\target\debug\deps\xz2-4a223ec7b5607790.exe` (never executed)
Error: Process completed with exit code 1.

Not sure what caused this, but looks like a problem in dependency?

alexcrichton commented 2 years ago

Thanks but I think this is better done through CFLAGS-style configuration rather than baking it in.