1bf215546Sopenharmony_ci#!/bin/bash
2bf215546Sopenharmony_ci
3bf215546Sopenharmony_cindk=$1
4bf215546Sopenharmony_ciarch=$2
5bf215546Sopenharmony_cicpu_family=$3
6bf215546Sopenharmony_cicpu=$4
7bf215546Sopenharmony_cicross_file="/cross_file-$arch.txt"
8bf215546Sopenharmony_ci
9bf215546Sopenharmony_ci# armv7 has the toolchain split between two names.
10bf215546Sopenharmony_ciarch2=${5:-$2}
11bf215546Sopenharmony_ci
12bf215546Sopenharmony_ci# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
13bf215546Sopenharmony_ci# and allowing it in code generation means we get unwind symbols that break
14bf215546Sopenharmony_ci# the libEGL and driver symbol tests.
15bf215546Sopenharmony_ci
16bf215546Sopenharmony_cicat >$cross_file <<EOF
17bf215546Sopenharmony_ci[binaries]
18bf215546Sopenharmony_ciar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
19bf215546Sopenharmony_cic = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
20bf215546Sopenharmony_cicpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
21bf215546Sopenharmony_cic_ld = 'lld'
22bf215546Sopenharmony_cicpp_ld = 'lld'
23bf215546Sopenharmony_cistrip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
24bf215546Sopenharmony_cipkgconfig = ['/usr/bin/pkg-config']
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ci[host_machine]
27bf215546Sopenharmony_cisystem = 'linux'
28bf215546Sopenharmony_cicpu_family = '$cpu_family'
29bf215546Sopenharmony_cicpu = '$cpu'
30bf215546Sopenharmony_ciendian = 'little'
31bf215546Sopenharmony_ci
32bf215546Sopenharmony_ci[properties]
33bf215546Sopenharmony_cineeds_exe_wrapper = true
34bf215546Sopenharmony_ci
35bf215546Sopenharmony_ciEOF
36