mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-12 03:34:34 +08:00
meson: Check arguments before adding.
-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>
This commit is contained in:
parent
5db098c98b
commit
22673a980f
@ -376,7 +376,7 @@ debian/android_build:
|
||||
extends:
|
||||
- .use-debian/x86_build-base
|
||||
variables:
|
||||
MESA_IMAGE_TAG: &debian-android_build "2021-10-02-libelf-2"
|
||||
MESA_IMAGE_TAG: &debian-android_build "2021-10-26-static-libstdcxx"
|
||||
|
||||
.use-debian/android_build:
|
||||
extends:
|
||||
|
@ -17,7 +17,7 @@ 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', '-static-libstdc++']
|
||||
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'
|
||||
|
21
meson.build
21
meson.build
@ -1213,11 +1213,22 @@ if host_machine.system() == 'windows'
|
||||
endif
|
||||
else
|
||||
add_project_link_arguments(
|
||||
'-Wl,--nxcompat',
|
||||
'-Wl,--dynamicbase',
|
||||
'-static-libgcc',
|
||||
'-static-libstdc++',
|
||||
language : ['c', 'cpp'],
|
||||
cc.get_supported_arguments(
|
||||
'-Wl,--nxcompat',
|
||||
'-Wl,--dynamicbase',
|
||||
'-static-libgcc',
|
||||
'-static-libstdc++',
|
||||
),
|
||||
language : ['c'],
|
||||
)
|
||||
add_project_link_arguments(
|
||||
cpp.get_supported_arguments(
|
||||
'-Wl,--nxcompat',
|
||||
'-Wl,--dynamicbase',
|
||||
'-static-libgcc',
|
||||
'-static-libstdc++',
|
||||
),
|
||||
language : ['cpp'],
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user