Open
Description
Error with cargo zigbuild(cc-rs 1.2.8)
Example
- Add mimalloc-rust to Hello World to satisfy the dependency with cc-rs.
- Add the --target option to cargo zigbuild and compile.
RUSTFLAGS="" cargo zigbuild -r --message-format=json-render-diagnostics --target aarch64-unknown-linux-gnu
RUSTFLAGS="" cargo zigbuild -r --message-format=json-render-diagnostics --target x86_64-unknown-linux-gnu
The following error occurs.
cargo:warning=error: Unknown Clang option: '--'
--- stderr
error occurred in cc-rs: Command LC_ALL="C" "/home/phoepsilonix/.cache/cargo-zigbuild/0.19.7/zigcc-x86_64-unknown-linux-gnu-7d27.sh" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "--target=x86_64-unknown-linux-gnu" "-I" "./mimalloc/include" "-I" "./mimalloc/src" "-DMI_BUILD_SHARED=0" "-DMI_DEBUG_FUL=0" "-DMI_DEBUG=0" "-o" "/home/phoepsilonix/work/myrust/target/x86_64-unknown-linux-gnu/release/build/mimalloc-rust-sys-752dde8e6a6b38c9/out/96c74dbd1b51cfc5-static.o" "-c" "--" "./mimalloc/src/static.c" with args zigcc-x86_64-unknown-linux-gnu-7d27.sh did not execute successfully (status code exit status: 1).
I tried to fix this by adjusting the zig_cc rule. #1361