Module: Mesa Branch: staging/22.3 Commit: 4de4cd95d8e1d8a94a46ff2b69d0bf3b491b4f5f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4de4cd95d8e1d8a94a46ff2b69d0bf3b491b4f5f
Author: Yonggang Luo <[email protected]> Date: Tue Nov 8 20:32:07 2022 +0800 meson: Refactoring shared gen_vs_module_defs_normal_command out Cc: mesa-stable Signed-off-by: Yonggang Luo <[email protected]> Reviewed-by: Jesse Natalie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19610> (cherry picked from commit f03421702cc35059e4ead86839906ddfcf05bdc7) --- .pick_status.json | 2 +- bin/meson.build | 5 +++++ src/egl/meson.build | 4 +--- src/gallium/targets/d3d10sw/meson.build | 4 +--- src/gallium/targets/libgl-gdi/meson.build | 4 +--- src/gallium/targets/osmesa/meson.build | 4 +--- src/gallium/targets/va/meson.build | 4 +--- src/gallium/targets/wgl/meson.build | 4 +--- src/mapi/es1api/meson.build | 4 +--- src/mapi/es2api/meson.build | 4 +--- src/vulkan/meson.build | 4 +--- 11 files changed, 15 insertions(+), 28 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 5fc55799fbd..9770c40ad44 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -193,7 +193,7 @@ "description": "meson: Refactoring shared gen_vs_module_defs_normal_command out", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/bin/meson.build b/bin/meson.build index 1b7301585f9..a70f83bbf8b 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -20,5 +20,10 @@ git_sha1_gen_py = files('git_sha1_gen.py') gen_vs_module_defs_py = files('gen_vs_module_defs.py') +gen_vs_module_defs_normal_command = [ + prog_python, gen_vs_module_defs_py, + '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', + '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family() +] symbols_check = find_program('symbols-check.py') install_megadrivers_py = find_program('install_megadrivers.py') diff --git a/src/egl/meson.build b/src/egl/meson.build index f1d77b64cc5..a7c6471ceb4 100644 --- a/src/egl/meson.build +++ b/src/egl/meson.build @@ -183,9 +183,7 @@ egl_def = custom_target( 'egl.def', input: 'main/egl.def.in', output : 'egl.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libegl = shared_library( diff --git a/src/gallium/targets/d3d10sw/meson.build b/src/gallium/targets/d3d10sw/meson.build index 26d175e3828..727a807f1ba 100644 --- a/src/gallium/targets/d3d10sw/meson.build +++ b/src/gallium/targets/d3d10sw/meson.build @@ -23,9 +23,7 @@ d3d10_sw_def = custom_target( 'd3d10_sw.def', input: 'd3d10_sw.def.in', output : 'd3d10_sw.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libd3d10sw = shared_library( diff --git a/src/gallium/targets/libgl-gdi/meson.build b/src/gallium/targets/libgl-gdi/meson.build index 7ddcd8a1928..b3dd3f4dca1 100644 --- a/src/gallium/targets/libgl-gdi/meson.build +++ b/src/gallium/targets/libgl-gdi/meson.build @@ -25,9 +25,7 @@ opengl32_def = custom_target( 'opengl32.def', input: 'opengl32.def.in', output : 'opengl32.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libopengl32 = shared_library( diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build index b9ca388fe5e..024bac32b58 100644 --- a/src/gallium/targets/osmesa/meson.build +++ b/src/gallium/targets/osmesa/meson.build @@ -36,9 +36,7 @@ osmesa_def = custom_target( 'osmesa.def', input: 'osmesa.def.in', output : 'osmesa.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libosmesa = shared_library( diff --git a/src/gallium/targets/va/meson.build b/src/gallium/targets/va/meson.build index d0691729f43..fc7814c3a8f 100644 --- a/src/gallium/targets/va/meson.build +++ b/src/gallium/targets/va/meson.build @@ -56,9 +56,7 @@ if host_machine.system() == 'windows' 'vaon12.def', input: vaon12_def_input, output : 'vaon12.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libva_gallium = shared_library( diff --git a/src/gallium/targets/wgl/meson.build b/src/gallium/targets/wgl/meson.build index 62c45304e3d..eaca0aec86b 100644 --- a/src/gallium/targets/wgl/meson.build +++ b/src/gallium/targets/wgl/meson.build @@ -25,9 +25,7 @@ wgl_def = custom_target( 'gallium_wgl.def', input: 'gallium_wgl.def.in', output : 'gallium_wgl.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) gallium_wgl_name = get_option('gallium-windows-dll-name') diff --git a/src/mapi/es1api/meson.build b/src/mapi/es1api/meson.build index 733002339a4..d0d89b46447 100644 --- a/src/mapi/es1api/meson.build +++ b/src/mapi/es1api/meson.build @@ -36,9 +36,7 @@ gles1_def = custom_target( 'gles1.def', input: 'gles1.def.in', output : 'gles1.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libglesv1_cm = shared_library( diff --git a/src/mapi/es2api/meson.build b/src/mapi/es2api/meson.build index d8f54eb64f4..1156ee92e42 100644 --- a/src/mapi/es2api/meson.build +++ b/src/mapi/es2api/meson.build @@ -36,9 +36,7 @@ gles2_def = custom_target( 'gles2.def', input: 'gles2.def.in', output : 'gles2.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) libgles2 = shared_library( diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build index 1e9ab82ce57..6a95768c5e8 100644 --- a/src/vulkan/meson.build +++ b/src/vulkan/meson.build @@ -30,9 +30,7 @@ vulkan_api_def = custom_target( 'vulkan_api.def', input: 'vulkan_api.def.in', output : 'vulkan_api.def', - command : [prog_python, gen_vs_module_defs_py, - '--in_file', '@INPUT@', '--out_file', '@OUTPUT@', - '--compiler_id', cc.get_argument_syntax(), '--cpu_family', host_machine.cpu_family()] + command : gen_vs_module_defs_normal_command, ) if with_platform_x11
