]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh
Auto merge of #72717 - poliorcetics:try-from-int-to-nzint, r=dtolnay
[rust.git] / src / ci / docker / dist-various-2 / x86_64-fortanix-unknown-sgx-clang-wrap.sh
1 #!/bin/bash
2
3 args=("$@")
4
5 for i in "${!args[@]}"; do
6     # x86_64-fortanix-unknown-sgx doesn't have a C sysroot for things like
7     # stdint.h and the C++ STL. Unlike GCC, clang will not use the host's
8     # sysroot instead. Force it.
9     if [ "${args[$i]}" = "--target=x86_64-fortanix-unknown-sgx" ]; then
10         args[$i]="--target=x86_64-unknown-linux-gnu"
11     fi
12 done
13
14 exec "${0/x86_64-fortanix-unknown-sgx-clang/clang}" "${args[@]}"