Closed andrewgazelka closed 4 months ago
This is https://github.com/bytecodealliance/wasmtime/issues/8730, which is an incompatibility with the new linker of XCode 15. As workaround you can use RUSTFLAGS="-Clink-arg=-ld_classic"
. Or alternatively downgrade to XCode 14.
This is bytecodealliance/wasmtime#8730, which is an incompatibility with the new linker of XCode 15. As workaround you can use
RUSTFLAGS="-Clink-arg=-ld_classic"
. Or alternatively downgrade to XCode 14.
ok cool... how would I add this to .cargo/config
?
which [target.{x}]
would I use
I think the following would work:
[target. "aarch64-apple-darwin"]
rustflags = ["-Clink-arg=-ld_classic"]
I think the following would work:
[target. "aarch64-apple-darwin"] rustflags = ["-Clink-arg=-ld_classic"]
yea I was trying that but for some reason I needed to add RUSTFLAGS env variable instead 🤷♂️. welp maybe I will figure out why later.
What is the exact command that works? The following command still fails for me.
RUSTFLAGS="-Clink-arg=-ld_classic" ./y.sh build
Using the normal cargo build command works but the executable is not functional.
# The following command builds
RUSTFLAGS="-Clink-arg=-ld_classic" cargo build
# The executable gives the following error
cargo-clif build
error[E0463]: can't find crate for `core`
|
= note: the `aarch64-apple-darwin` target may not be installed
= help: consider downloading the target with `rustup target add aarch64-apple-darwin`
= help: consider building the standard library from source with `cargo build -Zbuild-std`
Thank you in advance.
There are two options:
RUSTFLAGS="-Clink-arg=-Wl,-ld_classic" /path/to/cargo-clif build
when building your project.Thank you very much @bjorn3. The second solution worked great.
Should the cargo-clif build
work for this project? When attempting to build this project with clif there are errors of missing dependencies. This is still for AppleARM.
cargo-clif build
is not expected to work on cg_clif itself. cargo-clif is one of the outputs of building cg_clif and is meant to be used to build your own project using cg_clif.