title: Cross compile in mac m1 - build for x86_64 linux
body: <p>I want to build cdylib crate of my repo <a href="https://github.com/doki23/prql-java" rel="nofollow noreferrer">https://github.com/doki23/prql-java</a> in my mac m1.</p>
  <p>My operations are:</p>
  <pre><code>rustup target add x86_64-unknown-linux-gnu
  cargo build --target x86_64-unknown-linux-gnu
  </code></pre>
  <p>but I met the problem:</p>
  <blockquote>
  <p>= note: ld: unknown option: --version-script=/var/folders/df/1lz9t40n171_5550cy_f1h3c0000gn/T/rustczqz5TV/list
  clang: error: linker command failed with exit code 1 (use -v to see invocation)</p>
  </blockquote>
  <p>How to build a x86_64 linux lib in mac m1?</p>