mesa/src/mesa/state_tracker/tests
Alyssa Rosenzweig 45fca7b440 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>
2022-05-09 13:07:36 +00:00
..
meson.build mesa/st: Fix building tests on macOS 2022-05-09 13:07:36 +00:00
st_format.c