
When cross-building for Android meson fails to find supported compiler arguments for the C++ cross-compiler, e.g.: ``` Compiler for C++ supports arguments -Wno-array-bounds: NO (cached) Compiler for C++ supports arguments -Wno-overflow: NO Compiler for C++ supports arguments -Wno-c++11-narrowing: NO (cached) Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO (cached) ``` This is due to an **unrelated** and more generic compilation failure when testing for the supported arguments, e.g.: ``` Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -static-libstdc++ /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpv6_hke9l/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 1 stderr: clang++: error: argument unused during compilation: '-static-libstdc++' [-Werror,-Wunused-command-line-argument] ----------- Compiler for C++ supports arguments -Wno-vla-cxx-extension: NO ``` The issue is caused by how the cross compiler is set up by .gitlab-ci/container/create-android-cross-file.sh Allow the cross compiler to still start even when the `-Werror,-Wunused-command-line-argument` error occurs in order to be able to actually detect other arguments: ``` Command line: `/tmp/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang++ -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables --start-no-unused-arguments -static-libstdc++ --end-no-unused-arguments /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/testfile.cpp -o /home/ao2/Collabora/GOO0042/mesa/_build/meson-private/tmpm6eolxed/output.obj -c -Wno-error=c99-designator -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=self-assign -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Werror=implicit-function-declaration -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wvla-cxx-extension -Wno-vla-cxx-extension` -> 0 Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES ``` This makes argument detection work again, e.g: ``` Compiler for C++ supports arguments -Wno-array-bounds: YES (cached) Compiler for C++ supports arguments -Wno-overflow: YES Compiler for C++ supports arguments -Wno-c++11-narrowing: YES (cached) Compiler for C++ supports arguments -Wno-vla-cxx-extension: YES (cached) ``` Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12441 Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Valentine Burley <valentine.burley@collabora.com> Reviewed-by: Rob Clark <robclark@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33013>
The software may implement third party technologies (e.g. third party libraries) that are not licensed to you by AMD and for which you may need to obtain licenses from other parties. Unless explicitly stated otherwise, these third party technologies are not licensed hereunder. Such third party technologies include, but are not limited, to H.264, MPEG-2, MPEG-4, AVC, and VC-1. For MPEG-2 Intermediate Products: ANY USE OF THIS PRODUCT IN ANY MANNER OTHER THAN PERSONAL USE THAT COMPLIES WITH THE MPEG-2 STANDARD IS EXPRESSLY PROHIBITED WITHOUT A LICENSE UNDER APPLICABLE PATENTS IN THE MPEG-2 PATENT PORTFOLIO, WHICH LICENSES IS AVAILABLE FROM MPEG LA, LLC, 6312 S. Fiddlers Green Circle, Suite 400E, Greenwood Village, Colorado 80111 U.S.A. WARRANTY DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. AMD DISCLAIMS ALL WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, THAT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR-FREE OR WARRANTIES ARISING FROM CUSTOM OF TRADE OR COURSE OF USAGE. THE ENTIRE RISK ASSOCIATED WITH THE USE OF THE SOFTWARE IS ASSUMED BY YOU. Some jurisdictions do not allow the exclusion of implied warranties, so the above exclusion may not apply to You. LIMITATION OF LIABILITY AND INDEMNIFICATION: AMD AND ITS LICENSORS WILL NOT, UNDER ANY CIRCUMSTANCES BE LIABLE FOR ANY PUNITIVE, DIRECT, INCIDENTAL, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM USE OF THE SOFTWARE OR THIS AGREEMENT EVEN IF AMD AND ITS LICENSORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event shall AMD's total liability to You for all damages, losses, and causes of action (whether in contract, tort (including negligence) or otherwise) exceed the amount of $100 USD. You agree to defend, indemnify and hold harmless AMD and its licensors, and any of their directors, officers, employees, affiliates or agents from and against any and all loss, damage, liability and other expenses (including reasonable attorneys' fees), resulting from Your use of the Software or violation of the terms and conditions of this Agreement. U.S. GOVERNMENT RESTRICTED RIGHTS: The Software is provided with "RESTRICTED RIGHTS." Use, duplication, or disclosure by the Government is subject to the restrictions as set forth in FAR 52.227-14 and DFAR252.227-7013, et seq., or its successor. Use of the Software by the Government constitutes acknowledgement of AMD's proprietary rights in them. EXPORT RESTRICTIONS: The Software may be subject to export restrictions as stated in the Software License Agreement.