<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/97595>97595</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            cross compile for aarch64 _config_site' file not found
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xiedeacc
      </td>
    </tr>
</table>

<pre>
    my host is linux x86_64. I want clang can build binary both for x86_64 and aarch64, x86_64 works well, but build for aarch64 use follow command meet error fatal error: '__config_site' file not found

```
clang --target=aarch64-linux-gnu \
--sysroot=/root/src/software/openwrt/openwrt-toolchain-23.05.3-rockchip-armv8_gcc-12.3.0_musl.Linux-x86_64/toolchain-aarch64_generic_gcc-12.3.0_musl \
main.cc
```

after google a lot, most doc ambiguous, but get clang it self need compile with some option to support for cross compile, my llvm/clang compiled by below command,  it seems miss LLVM_RUNTIME_TARGETS option, but cannot find this option from https://llvm.org/docs/CMake.html , and what's difference between LLVM_RUNTIME_TARGETS and LLVM_TARGET_ARCH???


```
cmake -G "Unix Makefiles" ../llvm \
    -DCMAKE_INSTALL_PREFIX=/usr/local/llvm/18 \
 -DCMAKE_BUILD_TYPE=Release \
 -DLLVM_ENABLE_PROJECTS="bolt;clang;clang-tools-extra;libclc;lld;lldb;mlir;polly;openmp" \
 -DLLVM_ENABLE_RUNTIMES="libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt" \
    -DLLVM_INCLUDE_TESTS=OFF \
    -DLLVM_BUILD_TESTS=OFF \
 -DLLDB_INCLUDE_TESTS=OFF \
    -DCLANG_INCLUDE_TESTS=OFF \
 -DCLANG_DEFAULT_CXX_STDLIB=libc++ \
    -DCLANG_DEFAULT_RTLIB=compiler-rt \
    -DCLANG_DEFAULT_LINKER=lld
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMVV2P4jYU_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