diff options
author | Eric Engestrom <eric@engestrom.ch> | 2022-08-22 21:03:15 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-08-24 22:13:19 +0000 |
commit | c66622de3af4efc3717131c55a54b408bc7faade (patch) | |
tree | dd84ff37bb777e91167ad40caf5077a8761d21a7 /src | |
parent | 76bcf69e33b9452bdbc9c79e64ba4353dd57398a (diff) | |
download | mesa-c66622de3af4efc3717131c55a54b408bc7faade.tar.gz mesa-c66622de3af4efc3717131c55a54b408bc7faade.tar.bz2 mesa-c66622de3af4efc3717131c55a54b408bc7faade.zip |
meson: replace manual compiler flags with meson arguments
These would only have worked in GCC and Clang, which so far wasn't an
issue, but let's clean it up anyway.
Cc: mesa-stable
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18190>
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/meson.build | 5 | ||||
-rw-r--r-- | src/freedreno/ds/meson.build | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/meson.build | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r600/sfn/tests/meson.build | 3 | ||||
-rw-r--r-- | src/intel/ds/meson.build | 4 | ||||
-rw-r--r-- | src/panfrost/ds/meson.build | 2 | ||||
-rw-r--r-- | src/tool/pps/meson.build | 6 |
7 files changed, 15 insertions, 10 deletions
diff --git a/src/egl/meson.build b/src/egl/meson.build index 6420f85fb74..f1d77b64cc5 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -23,6 +23,7 @@ inc_egl_dri2 = include_directories('drivers/dri2') c_args_for_egl = [asan_c_args] cpp_args_for_egl = [] +override_for_egl = [] link_for_egl = [] deps_for_egl = [] incs_for_egl = [inc_include, inc_src, inc_egl] @@ -131,7 +132,8 @@ if with_dri2 if dep_android_mapper4.found() files_egl += files('drivers/dri2/platform_android_mapper.cpp') c_args_for_egl += '-DUSE_IMAPPER4_METADATA_API' - cpp_args_for_egl += ['-std=c++17', '-DUSE_IMAPPER4_METADATA_API'] + cpp_args_for_egl += '-DUSE_IMAPPER4_METADATA_API' + override_for_egl += 'cpp_std=c++17' endif endif elif with_platform_haiku @@ -194,6 +196,7 @@ libegl = shared_library( '-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_@0@'.format(egl_native_platform.to_upper()), ], cpp_args : [cpp_args_for_egl], + override_options : override_for_egl, gnu_symbol_visibility : 'hidden', include_directories : incs_for_egl, link_with : [link_for_egl, libglapi], diff --git a/src/freedreno/ds/meson.build b/src/freedreno/ds/meson.build index 50f099a9e07..ad210bef9da 100644 --- a/src/freedreno/ds/meson.build +++ b/src/freedreno/ds/meson.build @@ -21,7 +21,7 @@ pps_freedreno_lib = static_library( dep_perfetto, dep_valgrind, ], - cpp_args: '-std=c++17' + override_options: ['cpp_std=c++17'] ) pps_freedreno_dep = declare_dependency( diff --git a/src/gallium/drivers/r600/meson.build b/src/gallium/drivers/r600/meson.build index eb01c79a2b9..88181642dfa 100644 --- a/src/gallium/drivers/r600/meson.build +++ b/src/gallium/drivers/r600/meson.build @@ -193,7 +193,7 @@ if with_gallium_opencl r600_c_args += '-DHAVE_OPENCL' endif -r600_cpp_args = ['-std=c++17'] +r600_cpp_args = [] if cpp.has_type('std::pmr::monotonic_buffer_resource', args:['-std=c++17'], prefix : '#include <memory_resource>') @@ -205,6 +205,7 @@ libr600 = static_library( [files_r600, egd_tables_h], c_args : [r600_c_args, '-Wstrict-overflow=0'], cpp_args: r600_cpp_args, + override_options: ['cpp_std=c++17'], gnu_symbol_visibility : 'hidden', include_directories : [ inc_src, inc_mapi, inc_mesa, inc_include, inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common, diff --git a/src/gallium/drivers/r600/sfn/tests/meson.build b/src/gallium/drivers/r600/sfn/tests/meson.build index ba00dc58c05..d9d19f3c856 100644 --- a/src/gallium/drivers/r600/sfn/tests/meson.build +++ b/src/gallium/drivers/r600/sfn/tests/meson.build @@ -1,6 +1,7 @@ r600_test_lib = static_library('r600_test', 'sfn_test_shaders.cpp', cpp_args: r600_cpp_args, + override_options: ['cpp_std=c++17'], include_directories : [ inc_src, inc_mapi, inc_mesa, inc_include, inc_compiler, inc_gallium, inc_gallium_aux, inc_amd_common, inc_gallium_drivers, ], @@ -28,7 +29,7 @@ if with_tests executable('test-@0@-r600-sfn'.format(t), ['sfn_@0@_test.cpp'.format(t)], dependencies : [r600_test_dep], - cpp_args: '-std=c++17' + override_options: ['cpp_std=c++17'] ), suite : ['r600'] ) diff --git a/src/intel/ds/meson.build b/src/intel/ds/meson.build index 64b6c9e36eb..ea9da889a12 100644 --- a/src/intel/ds/meson.build +++ b/src/intel/ds/meson.build @@ -39,7 +39,7 @@ libintel_driver_ds = static_library( include_directories : [inc_src, inc_include, inc_intel, inc_mapi, inc_mesa], link_with : [libintel_perf, libintel_dev], dependencies : libintel_driver_ds_deps, - cpp_args : '-std=c++17', + override_options : ['cpp_std=c++17'], gnu_symbol_visibility : 'hidden', ) @@ -61,7 +61,7 @@ if with_perfetto and (with_datasources.contains('intel') or with_datasources.con include_directories: [inc_tool, inc_src, inc_include, inc_intel], link_with: [libintel_perf, libintel_dev], dependencies: [dep_perfetto, dep_libdrm, idep_mesautil], - cpp_args: '-std=c++17' + override_options: ['cpp_std=c++17'] ) compile_args_pps_intel = ['-DPPS_INTEL'] diff --git a/src/panfrost/ds/meson.build b/src/panfrost/ds/meson.build index 379a25c4d26..9a8bdaf08ec 100644 --- a/src/panfrost/ds/meson.build +++ b/src/panfrost/ds/meson.build @@ -16,7 +16,7 @@ pps_panfrost_lib = static_library( sources: pps_panfrost_sources, include_directories: pps_panfrost_includes, dependencies: [dep_libdrm, dep_perfetto, libpanfrost_dep, dep_panfrost_perf], - cpp_args: '-std=c++17' + override_options: ['cpp_std=c++17'] ) compile_args_pps_panfrost = ['-DPPS_PANFROST'] diff --git a/src/tool/pps/meson.build b/src/tool/pps/meson.build index e0e0361d6f2..4261fbc4ef5 100644 --- a/src/tool/pps/meson.build +++ b/src/tool/pps/meson.build @@ -21,7 +21,7 @@ lib_pps = static_library( sources: pps_sources, include_directories: [include_pps, inc_src, pps_includes], dependencies: pps_deps, - cpp_args: '-std=c++17' + override_options: ['cpp_std=c++17'], ) dep_pps = declare_dependency( @@ -39,7 +39,7 @@ executable( sources: producer_sources, include_directories: [include_pps, inc_src], dependencies: [dep_pps, dep_perfetto], - cpp_args: '-std=c++17', + override_options: ['cpp_std=c++17'], install: true ) @@ -55,7 +55,7 @@ if dep_docopt.found() sources: config_sources, include_directories: [include_pps, inc_src], dependencies: [dep_pps, dep_docopt], - cpp_args: '-std=c++17', + override_options: ['cpp_std=c++17'], install: true ) endif |