summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2020-03-10 17:26:35 +0000
committerDylan Baker <dylan@pnwbakers.com>2020-03-16 10:47:23 -0700
commit9a9413a7c5be2f5ed2a249f70388a56cdd3fda09 (patch)
tree257338d646da57f49054e2db36a0ff7938aee1ed
parent3cfca286afc66dbc2846cde7ccd942e39b4a0ccb (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 <dylan@pnwbakers.com> Reviewed-by: Neha Bhende <bhenden@vmware.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4186> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4186> (cherry picked from commit f6dad10d0474cc80228636d6deb45b6025583566)
-rw-r--r--.pick_status.json2
-rw-r--r--src/compiler/glsl/glcpp/meson.build15
-rw-r--r--src/compiler/glsl/meson.build2
3 files changed, 14 insertions, 5 deletions
diff --git a/.pick_status.json b/.pick_status.json
index ce141f67ecf..f7343b3cd55 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -103,7 +103,7 @@
"description": "meson: Avoid duplicate symbols.",
"nominated": false,
"nomination_type": null,
- "resolution": 4,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/compiler/glsl/glcpp/meson.build b/src/compiler/glsl/glcpp/meson.build
index 9fc8d9d0286..04b11a381e3 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,
)
diff --git a/src/compiler/glsl/meson.build b/src/compiler/glsl/meson.build
index 74cb8973077..e9fe56a824b 100644
--- a/src/compiler/glsl/meson.build
+++ b/src/compiler/glsl/meson.build
@@ -239,7 +239,7 @@ libglsl_standalone = static_library(
c_args : [c_vis_args, c_msvc_compat_args, no_override_init_args],
cpp_args : [cpp_vis_args, cpp_msvc_compat_args],
include_directories : [inc_common],
- link_with : [libglsl, libglsl_util],
+ link_with : [libglsl, libglsl_util, libglcpp_standalone],
dependencies : [idep_mesautil, idep_getopt],
build_by_default : false,
)