aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/meson.build
diff options
context:
space:
mode:
authorThierry Reding <[email protected]>2018-02-23 14:13:27 +0100
committerThierry Reding <[email protected]>2018-03-02 11:31:59 +0100
commit498faea103aa7966b435f21d8ff5e36172389b1e (patch)
tree2f7b5f4267295def7858a625a523e4969d1ecce7 /src/util/meson.build
parentc133a3411bbf47c2ba7d9cdae7e35a64fe276068 (diff)
disk cache: Link with -latomic if necessary
The disk cache implementation uses 64-bit atomic operations. For some architectures, such as 32-bit ARM, GCC will not be able to translate these operations into atomic, lock-free instructions and will instead rely on the external atomics library to provide these operations. Check at configuration time whether or not linking against libatomic is necessary and if so, create a dependency that can be used while linking the mesautil library. This is the meson equivalent of 2ef7f23820a6 ("configure: check if -latomic is needed for __atomic_*"). For some background information on this, see: https://gcc.gnu.org/wiki/Atomic/GCCMM Changes in v2: - clarify meaning of lock-free in commit message - fix build if -latomic is not necessary Acked-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'src/util/meson.build')
-rw-r--r--src/util/meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/meson.build b/src/util/meson.build
index b23dba3a985..eece1cefef6 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -102,7 +102,7 @@ libmesa_util = static_library(
'mesa_util',
[files_mesa_util, format_srgb],
include_directories : inc_common,
- dependencies : [dep_zlib, dep_clock, dep_thread],
+ dependencies : [dep_zlib, dep_clock, dep_thread, dep_atomic],
c_args : [c_msvc_compat_args, c_vis_args],
build_by_default : false
)