Disable unsupported linker flag on clang

This commit is contained in:
Caelan Sayler
2024-10-20 01:58:28 +01:00
committed by Caelan
parent 2178bfd49e
commit ce7b2dc2b7
3 changed files with 4 additions and 3 deletions

View File

@@ -1,10 +1,10 @@
fn main() { fn main() {
cxx_build::bridge("src/lib.rs") cxx_build::bridge("src/lib.rs")
.file("src/bridge.cc") .file("src/bridge.cc")
.warnings_into_errors(true)
.flag_if_supported("/std:c++17") .flag_if_supported("/std:c++17")
.flag_if_supported("/EHsc") // exception unwind handling .flag_if_supported("/EHsc") // exception unwind handling
.flag_if_supported("-Wno-unused-function") // allow unused functions .flag_if_supported("-Wno-unused-function") // allow unused functions
.warnings_into_errors(true)
.define("VELOPACK_LIBC_EXPORTS", Some("1")) .define("VELOPACK_LIBC_EXPORTS", Some("1"))
.std("c++17") .std("c++17")
.compile("velopack_libc"); .compile("velopack_libc");
@@ -13,5 +13,7 @@ fn main() {
println!("cargo:rerun-if-changed=src/lib.rs"); println!("cargo:rerun-if-changed=src/lib.rs");
println!("cargo:rerun-if-changed=src/bridge.hpp"); println!("cargo:rerun-if-changed=src/bridge.hpp");
println!("cargo:rerun-if-changed=src/bridge.cc"); println!("cargo:rerun-if-changed=src/bridge.cc");
#[cfg(target_os = "windows")]
println!("cargo:rustc-link-arg=/WHOLEARCHIVE:velopack_libc.lib"); println!("cargo:rustc-link-arg=/WHOLEARCHIVE:velopack_libc.lib");
} }

View File

@@ -1,3 +1,4 @@
#![allow(dead_code)]
#![allow(non_snake_case)] #![allow(non_snake_case)]
mod map; mod map;

View File

@@ -1,5 +1,3 @@
#![allow(dead_code)]
use std::path::PathBuf; use std::path::PathBuf;
use velopack::locator::VelopackLocatorConfig; use velopack::locator::VelopackLocatorConfig;
use velopack::{UpdateInfo, UpdateOptions, VelopackAsset}; use velopack::{UpdateInfo, UpdateOptions, VelopackAsset};