mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
meson: use a convenience lib for journal user sources
Instead of compiling those files twice, once for libsystemd and once for libshared, compile once as a static archive and then link into both. This reduce the meson target for man=no compile to 1291.
This commit is contained in:
parent
a8e559d4c6
commit
5e3cec87be
@ -1254,14 +1254,14 @@ libjournal_core = static_library(
|
||||
libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
|
||||
libsystemd = shared_library(
|
||||
'systemd',
|
||||
journal_internal_sources,
|
||||
version : libsystemd_version,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
'-Wl,--version-script=' + libsystemd_sym_path],
|
||||
link_with : [libbasic,
|
||||
libbasic_gcrypt],
|
||||
link_whole : libsystemd_static,
|
||||
link_whole : [libsystemd_static,
|
||||
libjournal_client],
|
||||
dependencies : [threads,
|
||||
librt,
|
||||
libxz,
|
||||
|
@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
journal_internal_sources = files('''
|
||||
journal_client_sources = files('''
|
||||
audit-type.c
|
||||
audit-type.h
|
||||
catalog.c
|
||||
@ -38,7 +38,7 @@ journal_internal_sources = files('''
|
||||
'''.split())
|
||||
|
||||
if conf.get('HAVE_GCRYPT') == 1
|
||||
journal_internal_sources += files('''
|
||||
journal_client_sources += files('''
|
||||
journal-authenticate.c
|
||||
journal-authenticate.h
|
||||
fsprg.c
|
||||
@ -69,7 +69,13 @@ audit_type_to_name = custom_target(
|
||||
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
||||
capture : true)
|
||||
|
||||
journal_internal_sources += [audit_type_to_name]
|
||||
journal_client_sources += [audit_type_to_name]
|
||||
|
||||
libjournal_client = static_library(
|
||||
'journal-client',
|
||||
journal_client_sources,
|
||||
include_directories : includes,
|
||||
c_args : ['-fvisibility=default'])
|
||||
|
||||
############################################################
|
||||
|
||||
|
@ -166,7 +166,6 @@ libshared_static = static_library(
|
||||
|
||||
libshared = shared_library(
|
||||
libshared_name,
|
||||
journal_internal_sources,
|
||||
libudev_sources,
|
||||
include_directories : includes,
|
||||
link_args : ['-shared',
|
||||
@ -174,7 +173,8 @@ libshared = shared_library(
|
||||
link_whole : [libshared_static,
|
||||
libbasic,
|
||||
libbasic_gcrypt,
|
||||
libsystemd_static],
|
||||
libsystemd_static,
|
||||
libjournal_client],
|
||||
c_args : ['-fvisibility=default'],
|
||||
dependencies : libshared_deps,
|
||||
install : true,
|
||||
|
Loading…
Reference in New Issue
Block a user