X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=vendor%2Fopenssl-sys%2Fbuild%2Fmain.rs;fp=vendor%2Fopenssl-sys%2Fbuild%2Fmain.rs;h=867e6f922beda3f2a636dfdde2d635e6cd06fcba;hb=6b6e7de7e2469c8fcce10a616c7ad72cd66a6d41;hp=0a34d3d171d117b25a958ac591c1352bed7aa7b7;hpb=db0cc3cb1731be5a00669b9d104e837ad4166dbd;p=cargo.git diff --git a/vendor/openssl-sys/build/main.rs b/vendor/openssl-sys/build/main.rs index 0a34d3d17..867e6f922 100644 --- a/vendor/openssl-sys/build/main.rs +++ b/vendor/openssl-sys/build/main.rs @@ -50,9 +50,21 @@ fn find_openssl(target: &str) -> (Vec, PathBuf) { find_normal::get_openssl(target) } +fn check_ssl_kind() { + if cfg!(feature = "unstable_boringssl") { + println!("cargo:rustc-cfg=boringssl"); + // BoringSSL does not have any build logic, exit early + std::process::exit(0); + } else { + println!("cargo:rustc-cfg=openssl"); + } +} + fn main() { check_rustc_versions(); + check_ssl_kind(); + let target = env::var("TARGET").unwrap(); let (lib_dirs, include_dir) = find_openssl(&target); @@ -180,9 +192,9 @@ specific to your distribution: # On Alpine Linux apk add openssl-dev -See rust-openssl README for more information: +See rust-openssl documentation for more information: - https://github.com/sfackler/rust-openssl#linux + https://docs.rs/openssl ", e ); @@ -258,6 +270,8 @@ See rust-openssl README for more information: (3, 4, 0) => ('3', '4', '0'), (3, 4, _) => ('3', '4', 'x'), (3, 5, _) => ('3', '5', 'x'), + (3, 6, 0) => ('3', '6', '0'), + (3, 6, _) => ('3', '6', 'x'), _ => version_error(), }; @@ -300,7 +314,7 @@ fn version_error() -> ! { " This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5 -through 3.5, but a different version of OpenSSL was found. The build is now aborting +through 3.6.x, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. "