alexcrichton / alexcrichton/openssl-src-rs
windows vendored openssl doesn't statically link
- 主要语言
- Rust
- 星标
- 80
- 派生
- 131
- 平均合并
- 49 分钟
- 30 天内合并 PR
- 2
描述
_Moving here discussion from sfackler/rust-openssl#1398_
Seems that on MSVC windows the library are always built as dlls, unless the `crt-static` feature is enabled. [This piece of code](https://github.com/alexcrichton/openssl-src-rs/blob/master/src/lib.rs#L151) is omitting the `no-shared` configuration argument to the `Configure` script, resulting in dll being built and binaries linked against `openssl-sys` still requiring dll to be installed or available in PATH.
Forcing that `no-static` argument, allows vendored openssl to link correctly.
I don't think that the [above linked configuration](https://github.com/alexcrichton/openssl-src-rs/blob/master/src/lib.rs#L151) is correct: from what I read, `crt-static` is something related to the base windows libraries and should not affect the linking of a library such as openssl; besides, openssl-sys already takes care of telling cargo to link correctly the windows runtime by properly adding:
```
cargo:rustc-link-lib=static=libssl
cargo:rustc-link-lib=static=libcrypto
cargo:rustc-link-lib=dylib=gdi32
cargo:rustc-link-lib=dylib=user32
cargo:rustc-link-lib=dylib=crypt32
cargo:rustc-link-lib=dylib=ws2_32
cargo:rustc-link-lib=dylib=advapi32
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。