rust-cross / cargo-zigbuild

Compile Cargo project with zig as linker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass -fno-sanitize=undefined to `zig cc`?

jiacai2050 opened this issue · comments

Since zig cc pass -fsanitize=undefined -fsanitize-trap=undefined by default, some project can be built successfully, but
will throw error when running

$ ./target/debug/foo
Illegal instruction

if let Ok(mut options) = Self::collect_zig_cc_options(&zig_wrapper, raw_target) {

After some research, it seems there is no way to pass zig cc options?