Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bindings: unfortunately, LTO does not seem to work...
I'm not sure why this is happening. My best guess is that it's either because: - the specific compiler that `cc` ends up using doesn't play nice with the bitcode that rustc/the LLVM linker plugin end up producing and expecting + the linker-plugin based LTO page mentions this: https://doc.rust-lang.org/rustc/linker-plugin-lto.html#toolchain-compatibility + also, there's actually (afaik) no easy way to externally (outside of `build.rs`) set what compiler `cc` should use (there are env vars but not ones that are specific to `cc`) and it's probably best not to assume that users will be using `clang`.. - or, we're not actually producing the ar format necessary, but this seems unlikely In any case, this is probably a good thing to stick behind a feature flag since the LTO setup seems somewhat brittle and we can't/shouldn't expect users to have modern versions of lld/clang.
- Loading branch information