From 48d5e9f07d5f59e2ccdfa62ac8c541a69f94fa04 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Wed, 14 Jan 2026 17:20:25 +0100 Subject: [PATCH] meson: remove prelinking the issues it was solving are fixed now :) Change-Id: I4f38d3ada22f454b57ea8245eadede0500e29451 --- lix/libexpr/meson.build | 31 +++---------------------------- lix/libfetchers/meson.build | 31 +++---------------------------- lix/libstore/meson.build | 31 +++---------------------------- lix/libutil/meson.build | 31 +++---------------------------- 4 files changed, 12 insertions(+), 112 deletions(-) diff --git a/lix/libexpr/meson.build b/lix/libexpr/meson.build index f9fa057be..0a66ec83d 100644 --- a/lix/libexpr/meson.build +++ b/lix/libexpr/meson.build @@ -289,8 +289,8 @@ dependencies = [ toml11, ] -libexpr_temp = library( - is_static ? 'lixexpr_temp' : 'lixexpr', +libexpr = library( + 'lixexpr', libexpr_sources, libexpr_settings_header, libexpr_generated_headers, @@ -302,35 +302,10 @@ libexpr_temp = library( '../libmain', ], cpp_pch : cpp_pch, - install : not is_static, + install : true, # FIXME(Qyriad): is this right? install_rpath : libdir, ) -# FIXME: remove when https://git.lix.systems/lix-project/lix/issues/359 is fixed. -# FIXME: replace by prelink when https://github.com/mesonbuild/meson/pull/14846 is widely available. -if is_static - libexpr_prelink = custom_target( - 'lixexpr-prelink', - output : 'lixexpr-prelink.o', - input : libexpr_temp, - command : [ - cxx.cmd_array(), - '-r', - '-o', - '@OUTPUT@', - is_darwin ? '-Wl,-force_load' : '-Wl,--whole-archive', - '@INPUT@', - ], - ) - libexpr = library( - 'lixexpr', - [libexpr_prelink], - dependencies : dependencies, - install : true, - ) -else - libexpr = libexpr_temp -endif install_headers( libexpr_headers, diff --git a/lix/libfetchers/meson.build b/lix/libfetchers/meson.build index d6067c091..39d66d177 100644 --- a/lix/libfetchers/meson.build +++ b/lix/libfetchers/meson.build @@ -53,42 +53,17 @@ dependencies = [ nlohmann_json, ] -libfetchers_temp = library( - is_static ? 'lixfetchers_temp' : 'lixfetchers', +libfetchers = library( + 'lixfetchers', libfetchers_settings_header, libfetchers_sources, dependencies : dependencies, include_directories : [ '../..' ], cpp_pch : cpp_pch, - install : not is_static, + install : true, # FIXME(Qyriad): is this right? install_rpath : libdir, ) -# FIXME: remove when https://git.lix.systems/lix-project/lix/issues/359 is fixed. -# FIXME: replace by prelink when https://github.com/mesonbuild/meson/pull/14846 is widely available. -if is_static - libfetchers_prelink = custom_target( - 'lixfetchers-prelink', - output : 'lixfetchers-prelink.o', - input : libfetchers_temp, - command : [ - cxx.cmd_array(), - '-r', - '-o', - '@OUTPUT@', - is_darwin ? '-Wl,-force_load' : '-Wl,--whole-archive', - '@INPUT@', - ], - ) - libfetchers = library( - 'lixfetchers', - [libfetchers_prelink], - dependencies : dependencies, - install : true, - ) -else - libfetchers = libfetchers_temp -endif install_headers(libfetchers_headers, subdir : 'lix/libfetchers', preserve_path : true) diff --git a/lix/libstore/meson.build b/lix/libstore/meson.build index 71c9caa99..073c08f52 100644 --- a/lix/libstore/meson.build +++ b/lix/libstore/meson.build @@ -351,8 +351,8 @@ if host_machine.system() == 'freebsd' dependencies += [ libprocstat ] endif -libstore_temp = library( - is_static ? 'lixstore_temp' : 'lixstore', +libstore = library( + 'lixstore', libstore_sources, libstore_generated_sources, libstore_settings_headers, @@ -362,35 +362,10 @@ libstore_temp = library( dependencies : dependencies, cpp_args : cpp_args, cpp_pch : cpp_pch, - install : not is_static, + install : true, # FIXME(Qyriad): is this right? install_rpath : libdir, ) -# FIXME: remove when https://git.lix.systems/lix-project/lix/issues/359 is fixed. -# FIXME: replace by prelink when https://github.com/mesonbuild/meson/pull/14846 is widely available. -if is_static - libstore_prelink = custom_target( - 'lixstore-prelink', - output : 'lixstore-prelink.o', - input : libstore_temp, - command : [ - cxx.cmd_array(), - '-r', - '-o', - '@OUTPUT@', - is_darwin ? '-Wl,-force_load' : '-Wl,--whole-archive', - '@INPUT@', - ], - ) - libstore = library( - 'lixstore', - [libstore_prelink], - dependencies : dependencies, - install : true, - ) -else - libstore = libstore_temp -endif install_headers(libstore_headers, subdir : 'lix/libstore', preserve_path : true) diff --git a/lix/libutil/meson.build b/lix/libutil/meson.build index 8decfa44c..f0af2a941 100644 --- a/lix/libutil/meson.build +++ b/lix/libutil/meson.build @@ -355,8 +355,8 @@ dependencies = [ liblixutil_rs, ] -libutil_temp = library( - is_static ? 'lixutil_temp' : 'lixutil', +libutil = library( + 'lixutil', libutil_sources, libutil_rpc_sources, libutil_rpc_headers, @@ -369,33 +369,8 @@ libutil_temp = library( include_directories : [ '../..' ], cpp_pch : cpp_pch, implicit_include_directories : true, - install : not is_static, + install : true, ) -# FIXME: remove when https://git.lix.systems/lix-project/lix/issues/359 is fixed. -# FIXME: replace by prelink when https://github.com/mesonbuild/meson/pull/14846 is widely available. -if is_static - libutil_prelink = custom_target( - 'lixutil-prelink', - output : 'lixutil-prelink.o', - input : libutil_temp, - command : [ - cxx.cmd_array(), - '-r', - '-o', - '@OUTPUT@', - is_darwin ? '-Wl,-force_load' : '-Wl,--whole-archive', - '@INPUT@', - ], - ) - libutil = library( - 'lixutil', - [libutil_prelink], - dependencies : dependencies, - install : true, - ) -else - libutil = libutil_temp -endif install_headers(libutil_headers, subdir : 'lix/libutil', preserve_path : true)