mesa/st: Fix building tests on macOS
Due to an upstream bug, macOS can't link empty static libraries.
There is open Meson bug about this use case [1], though arguably the issue
is macOS's implementation of ar. Of course, the functionality is mostly
useless.
The removal of GLSL-to-TGSI trivialized a static library, causing
linking to fail. This commit garbage collects the useless library.
This fixes the build on macOS:
FAILED: src/mesa/state_tracker/tests/libmesa_st_test_common.a
rm -f src/mesa/state_tracker/tests/libmesa_st_test_common.a && ar csr src/mesa/state_tracker/tests/libmesa_st_test_common.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
[1] https://github.com/mesonbuild/meson/issues/3735
Fixes: 214c774ba6
("mesa/st: Remove st_glsl_to_tgsi.")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16385>
This commit is contained in:
parent
79f4e33f04
commit
45fca7b440
|
@ -18,12 +18,6 @@
|
|||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
libmesa_st_test_common = static_library(
|
||||
'mesa_st_test_common',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies : [idep_gtest, idep_mesautil],
|
||||
)
|
||||
|
||||
test(
|
||||
'st_format_test',
|
||||
executable(
|
||||
|
@ -31,9 +25,9 @@ test(
|
|||
['st_format.c'],
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
link_with : [
|
||||
libmesa_st_test_common, libmesa, libglapi, libgallium,
|
||||
libmesa, libglapi, libgallium,
|
||||
],
|
||||
dependencies : idep_mesautil,
|
||||
dependencies : [idep_gtest, idep_mesautil],
|
||||
),
|
||||
suite : ['st_mesa'],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue