From 065eb05e3e73034a873b20093388cba3b7f13954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 18 Jul 2024 09:02:42 +0200 Subject: [PATCH] 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. --- meson.build | 6 ++++++ tests/meson.build | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index b2e2929b..868d8e36 100644 --- a/meson.build +++ b/meson.build @@ -252,6 +252,12 @@ pgolib = static_library( link_with: vtlib, ) +tokenize = static_library( + 'tokenizelib', + 'tokenize.c', + link_with: [common], +) + if get_option('b_pgo') == 'generate' executable( 'pgo', diff --git a/tests/meson.build b/tests/meson.build index 2b7768b0..9baa064c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,8 +1,8 @@ config_test = executable( 'test-config', - 'test-config.c', '../tokenize.c', + 'test-config.c', wl_proto_headers, - link_with: [common], + link_with: [common, tokenize], dependencies: [pixman, xkb, fontconfig, wayland_client, fcft, tllist]) test('config', config_test)