meson/pgo: fix PGO build errors with recent meson(?) versions

The back-reference to 'tokenize.c' in the parent directory causes PGO
build failures, where gcc can't find the PGO data. Likely due to
path/naming issues caused by meson's generated build directories.
This commit is contained in:
Daniel Eklöf 2024-07-18 09:02:42 +02:00
parent 36e4435bbf
commit 065eb05e3e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 2 deletions

View file

@ -252,6 +252,12 @@ pgolib = static_library(
link_with: vtlib, link_with: vtlib,
) )
tokenize = static_library(
'tokenizelib',
'tokenize.c',
link_with: [common],
)
if get_option('b_pgo') == 'generate' if get_option('b_pgo') == 'generate'
executable( executable(
'pgo', 'pgo',

View file

@ -1,8 +1,8 @@
config_test = executable( config_test = executable(
'test-config', 'test-config',
'test-config.c', '../tokenize.c', 'test-config.c',
wl_proto_headers, wl_proto_headers,
link_with: [common], link_with: [common, tokenize],
dependencies: [pixman, xkb, fontconfig, wayland_client, fcft, tllist]) dependencies: [pixman, xkb, fontconfig, wayland_client, fcft, tllist])
test('config', config_test) test('config', config_test)