aco: pass -fno-exceptions and -fno-rtti

We don't use exceptions or RTTI at all, so pass this flag to the compiler
to allow it to create better code.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6315>
This commit is contained in:
Rhys Perry 2020-08-14 11:26:44 +01:00 committed by Marge Bot
parent 51a6261d38
commit 7bfaeaa590
2 changed files with 5 additions and 1 deletions

View file

@ -85,6 +85,8 @@ libaco_files = files(
'aco_validate.cpp',
)
cpp_args_aco = cpp.get_supported_arguments(['-fno-exceptions', '-fno-rtti'])
_libaco = static_library(
'aco',
[libaco_files, aco_opcodes_c, aco_opcodes_h, aco_builder_h],
@ -100,6 +102,7 @@ _libaco = static_library(
],
gnu_symbol_visibility : 'hidden',
build_by_default : true,
cpp_args : cpp_args_aco,
)
# Also link with aco

View file

@ -46,7 +46,8 @@ test(
[aco_tests_files, gen_spirv_files],
cpp_args : ['-DACO_TEST_SOURCE_DIR="@0@"'.format(meson.current_source_dir()),
'-DACO_TEST_BUILD_ROOT="@0@"'.format(meson.build_root()),
'-DACO_TEST_PYTHON_BIN="@0@"'.format(prog_python.path())],
'-DACO_TEST_PYTHON_BIN="@0@"'.format(prog_python.path())] +
cpp_args_aco,
include_directories : [
inc_include, inc_src, inc_gallium, inc_compiler, inc_mesa, inc_mapi, inc_amd, inc_amd_common, inc_amd_common_llvm,
],