nostrdb-rs

nostrdb in rust!
git clone git://jb55.com/nostrdb-rs
Log | Files | Refs | Submodules | README | LICENSE

commit a39dc3bb0195208e444aff71350bca241dfc6e68
parent 2675e7244554e40c9ee10d82b42bc647fef4c17d
Author: William Casarin <jb55@jb55.com>
Date:   Wed,  3 Apr 2024 09:47:31 -0700

build: set -O1 on debug builds

This gets rid of the spammy FORTIFY_SOURCE warnings.

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mbuild.rs | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/build.rs b/build.rs @@ -30,6 +30,10 @@ fn secp256k1_build() { .file("nostrdb/deps/secp256k1/src/precomputed_ecmult.c") .file("nostrdb/deps/secp256k1/src/secp256k1.c"); + if env::var("PROFILE").unwrap() == "debug" { + base_config.flag("-O1"); + } + if base_config.try_compile("libsecp256k1.a").is_err() { // Some embedded platforms may not have, eg, string.h available, so if the build fails // simply try again with the wasm sysroot (but without the wasm type sizes) in the hopes @@ -80,6 +84,7 @@ fn main() { if env::var("PROFILE").unwrap() == "debug" { build.flag("-DDEBUG"); + build.flag("-O1"); } build.compile("libnostrdb.a");