mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-20 15:44:21 +08:00
22673a980f
-static-libstdc++ doesn't exist on the Android NDK, casuing all
later has_argument calls to return false even though the compiler
supports that argument.
Fixes: 3aee462781
"meson: add windows compiler checks and libraries"
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13164>
36 lines
1.0 KiB
Bash
36 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
ndk=$1
|
|
arch=$2
|
|
cpu_family=$3
|
|
cpu=$4
|
|
cross_file="/cross_file-$arch.txt"
|
|
|
|
# armv7 has the toolchain split between two names.
|
|
arch2=${5:-$2}
|
|
|
|
# Note that we disable C++ exceptions, because Mesa doesn't use exceptions,
|
|
# and allowing it in code generation means we get unwind symbols that break
|
|
# the libEGL and driver symbol tests.
|
|
|
|
cat >$cross_file <<EOF
|
|
[binaries]
|
|
ar = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-ar'
|
|
c = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
|
cpp = ['ccache', '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/${arch2}29-clang++', '-fno-exceptions', '-fno-unwind-tables', '-fno-asynchronous-unwind-tables']
|
|
c_ld = 'lld'
|
|
cpp_ld = 'lld'
|
|
strip = '$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/$arch-strip'
|
|
pkgconfig = ['/usr/bin/pkg-config']
|
|
|
|
[host_machine]
|
|
system = 'linux'
|
|
cpu_family = '$cpu_family'
|
|
cpu = '$cpu'
|
|
endian = 'little'
|
|
|
|
[properties]
|
|
needs_exe_wrapper = true
|
|
|
|
EOF
|