When I try to compile some rust code to x86_64-unknown-linux-gnu
using cargo build --target x86_64-unknown-linux-gnu
, it will always error out with this:
error: linking with `cc` failed: exit status: 1
|
(a whole bunch of file paths)
|
= note: clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
ld: unknown option: --as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: could not compile `my-project` due to previous error
What does this mean and how do I fix it?
(from x86_64-apple-darwin to x86_64-unknown-linux-gnu)