asahi: Make libasahi_lib depend on libasahi_decode
The track_alloc and track_free symbols are used, we need to link them in. Depending on build flags / environment / etc, fixes the potential build error hit by a CI job: mold: error: undefined symbol: agxdecode_track_alloc >>> referenced by agx_device.c >>> src/asahi/lib/libasahi_lib.a(src/asahi/lib/libasahi_lib.a.p/agx_device.c.o):(agx_shmem_alloc)>>> referenced by agx_device.c >>> src/asahi/lib/libasahi_lib.a(src/asahi/lib/libasahi_lib.a.p/agx_device.c.o):(agx_bo_create) mold: error: undefined symbol: agxdecode_track_free >>> referenced by agx_device.c >>> src/asahi/lib/libasahi_lib.a(src/asahi/lib/libasahi_lib.a.p/agx_device.c.o):(agx_bo_unreference) ...when trying to link with libasahi_lib without libasahi_decode for unit tests. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19871>
This commit is contained in:
committed by
Marge Bot
parent
6ee6cfec41
commit
8781aef6b4
@@ -46,16 +46,6 @@ idep_agx_pack = declare_dependency(
|
||||
include_directories : include_directories('.'),
|
||||
)
|
||||
|
||||
libasahi_lib = static_library(
|
||||
'asahi_lib',
|
||||
[libasahi_lib_files, agx_pack],
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_asahi],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies: [dep_libdrm, dep_valgrind, idep_nir, dep_iokit],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
libasahi_decode = static_library(
|
||||
'asahi_decode',
|
||||
[libasahi_decode_files, agx_pack],
|
||||
@@ -66,6 +56,17 @@ libasahi_decode = static_library(
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
libasahi_lib = static_library(
|
||||
'asahi_lib',
|
||||
[libasahi_lib_files, agx_pack],
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_asahi],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with: [libasahi_decode],
|
||||
dependencies: [dep_libdrm, dep_valgrind, idep_nir, dep_iokit],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
if with_tests
|
||||
test(
|
||||
'libasahi_tests',
|
||||
|
||||
Reference in New Issue
Block a user