Closed Dreamacro closed 1 year ago
strip
command is controlled by rustc
, so you should raise an issue in rust-lang/rust
instead.
But the warning only appears in zigbuild.
cargo build --release --target x86_64-apple-darwin
works well and have been strip.
cargo zigbuild --release --target x86_64-apple-darwin
emit strip warning and binary not strip
Probably because your default sdk is from CLT not Xcode, xcrun --show-sdk-path --sdk macosx
should give some hints.
And if cargo build
works for you, then you don't need to use cargo zigbuild
for this target, right?
Yes, I just used CLT. The reason I want to use zigbuild is that universal2-apple-darwin
, which is easier than merging manually.
Maybe you can try SDKROOT="" cargo zigbuild
to opt out of using the CLT SDK, but I'm not sure if it works.
Maybe you can try SDKROOT="" cargo zigbuild to opt out of using the CLT SDK, but I'm not sure if it works.
It doesn't work. But thank you for your help
Because the strip in
SDKROOT
sucks, it will fail to strip when building aarch64-apple-darwin/x86_64-apple-darwin.llvm-strip
works well.I tried to use
TARGET_STRIP=llvm-strip cargo zigbuild --release --target universal2-apple-darwin
but it doesn't work, is this possible?