mirror of
https://github.com/touchHLE/touchHLE.git
synced 2026-01-31 01:25:24 +01:00
Use the std method in cc-rs, now that it is available
This commit is contained in:
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -139,9 +139,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.77"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9f73505338f7d905b19d18738976aae232eb46b8efc15554ffc56deb5d9ebe4"
|
||||
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
|
||||
@@ -33,7 +33,7 @@ static = ["sdl2/bundled", "sdl2/static-link", "touchHLE_openal_soft_wrapper/stat
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[workspace.dependencies]
|
||||
cc = "1.0.77"
|
||||
cc = "1.0.83"
|
||||
cmake = "0.1.49"
|
||||
gl_generator = "0.14.0"
|
||||
|
||||
|
||||
@@ -16,20 +16,6 @@ fn link_lib(lib: &str) {
|
||||
println!("cargo:rustc-link-lib=static={}", lib);
|
||||
}
|
||||
|
||||
// See https://github.com/rust-lang/cc-rs/issues/565
|
||||
trait CPPVersion {
|
||||
fn cpp_version(&mut self, version: &str) -> &mut Self;
|
||||
}
|
||||
impl CPPVersion for cc::Build {
|
||||
fn cpp_version(&mut self, version: &str) -> &mut Self {
|
||||
if self.get_compiler().is_like_msvc() {
|
||||
self.flag(&format!("/std:{}", version))
|
||||
} else {
|
||||
self.flag(&format!("-std={}", version))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn build_type_windows() -> &'static str {
|
||||
if cfg!(target_os = "windows") {
|
||||
if cfg!(debug_assertions) {
|
||||
@@ -132,7 +118,7 @@ fn main() {
|
||||
cc::Build::new()
|
||||
.file(package_root.join("lib.cpp"))
|
||||
.cpp(true)
|
||||
.cpp_version("c++17")
|
||||
.std("c++17")
|
||||
.include(dynarmic_out.join("include"))
|
||||
.compile("dynarmic_wrapper");
|
||||
rerun_if_changed(&package_root.join("lib.cpp"));
|
||||
|
||||
Reference in New Issue
Block a user