mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-18 21:50:37 +00:00
added enabled sanitizers only in debug build
This commit is contained in:
@@ -29,9 +29,7 @@ fn main() -> anyhow::Result<()> {
|
||||
let pgxn_neon = std::fs::canonicalize(pgxn_neon)?;
|
||||
let pgxn_neon = pgxn_neon.to_str().ok_or(anyhow!("Bad non-UTF path"))?;
|
||||
|
||||
println!("cargo:rustc-link-arg=-fsanitize=address");
|
||||
println!("cargo:rustc-link-arg=-fsanitize=undefined");
|
||||
println!("cargo:rustc-link-arg=-static-libsan");
|
||||
enable_build_sanitizers_in_debug();
|
||||
println!("cargo:rustc-link-lib=static=pgport");
|
||||
println!("cargo:rustc-link-lib=static=pgcommon");
|
||||
println!("cargo:rustc-link-lib=static=walproposer");
|
||||
@@ -117,3 +115,10 @@ fn main() -> anyhow::Result<()> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
fn enable_build_sanitizers_in_debug() {
|
||||
println!("cargo:rustc-link-arg=-fsanitize=address");
|
||||
println!("cargo:rustc-link-arg=-fsanitize=undefined");
|
||||
println!("cargo:rustc-link-arg=-static-libsan");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user