diff options
author | Jose Fonseca <[email protected]> | 2020-03-10 17:26:35 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-16 11:52:26 +0000 |
commit | f6dad10d0474cc80228636d6deb45b6025583566 (patch) | |
tree | 98f0bf3dd613d2ba46ca037597e97a4e607b50bd /src/compiler/glsl/glcpp | |
parent | 4b61ad372d51681a3fb41b2dc21d2d58eb2becac (diff) |
meson: Avoid duplicate symbols.
All the stubs in src/compiler/glsl/glcpp/pp_standalone_scaffolding.c
are duplicate symbols. They should only be used as replacement for
Mesa functions when building glcpp and glsl standalone compilers, but
in fact they are getting linked with Mesa.
This change fixes this by moving the standalone stubs to a
libglcpp_standalone target, that's only linked with the glcpp/glsl
tools.
Reviewed-by: Dylan Baker <[email protected]>
Reviewed-by: Neha Bhende <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4186>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4186>
Diffstat (limited to 'src/compiler/glsl/glcpp')
-rw-r--r-- | src/compiler/glsl/glcpp/meson.build | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/compiler/glsl/glcpp/meson.build b/src/compiler/glsl/glcpp/meson.build index 5f3d85735af..81c8d65dca1 100644 --- a/src/compiler/glsl/glcpp/meson.build +++ b/src/compiler/glsl/glcpp/meson.build @@ -47,8 +47,7 @@ endif libglcpp = static_library( 'glcpp', - [glcpp_lex, glcpp_parse, files('glcpp.h', 'pp.c', - 'pp_standalone_scaffolding.c')], + [glcpp_lex, glcpp_parse, files('glcpp.h', 'pp.c')], dependencies : idep_mesautil, include_directories : [inc_common], c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args, _extra_args], @@ -56,12 +55,22 @@ libglcpp = static_library( build_by_default : false, ) +libglcpp_standalone = static_library( + 'glcpp_standalone', + 'pp_standalone_scaffolding.c', + link_with : libglcpp, + include_directories : [inc_common], + c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args, _extra_args], + cpp_args : [cpp_vis_args, cpp_msvc_compat_args, _extra_args], + build_by_default : false, +) + glcpp = executable( 'glcpp', 'glcpp.c', dependencies : [dep_m, idep_getopt], include_directories : [inc_common], - link_with : [libglcpp, libglsl_util], + link_with : [libglcpp_standalone, libglsl_util], c_args : [c_vis_args, no_override_init_args, c_msvc_compat_args], build_by_default : false, ) |