Closed dvc94ch closed 2 years ago
You can use your distro's provided clang but not lld.
is this the reason?
ld64.lld: error: unable to locate re-export with install name /usr/lib/system/libcache.dylib
so was able to cross compile a rust hello world with the following .cargo/config
using the distro clang and lld. no idea if the binary works yet as I don't have a mac to test it on.
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-target",
"-C", "link-arg=x86_64-apple-darwin",
"-C", "link-arg=-fuse-ld=lld",
"-C", "link-arg=-mmacosx-version-min=10.10",
"-C", "link-arg=-v",
"-C", "link-arg=-isystem",
"-C", "link-arg=/home/dvc/MacOSX10.10.sdk",
"-L", "/home/dvc/MacOSX10.10.sdk/usr/lib",
"-L", "/home/dvc/MacOSX10.10.sdk/usr/lib/system",
]
linker = "clang"
seems like it should be possible in principle these days?