mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-24 09:11:51 +00:00
meson: Skip static library when using sanitizer
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
8d77f43f5c
commit
5055c73d91
@ -130,6 +130,7 @@ endif
|
||||
cgrouppattern = get_option('cgroup-pattern')
|
||||
coverity = get_option('coverity-build')
|
||||
init_script = get_option('init-script')
|
||||
sanitize = get_option('b_sanitize')
|
||||
want_examples = get_option('examples')
|
||||
want_io_uring = get_option('io-uring-event-loop')
|
||||
want_pam_cgroup = get_option('pam-cgroup')
|
||||
@ -624,13 +625,18 @@ if want_io_uring
|
||||
liblxc_dependencies += [liburing]
|
||||
endif
|
||||
|
||||
liblxc_link_whole = []
|
||||
if sanitize == 'none'
|
||||
liblxc_link_whole = [liblxc_static]
|
||||
endif
|
||||
|
||||
liblxc = shared_library(
|
||||
'lxc',
|
||||
version: liblxc_version,
|
||||
include_directories: liblxc_includes,
|
||||
link_args: ['-DPIC'],
|
||||
c_args: ['-DPIC'],
|
||||
link_whole: [liblxc_static],
|
||||
link_whole: liblxc_link_whole,
|
||||
dependencies: liblxc_dependencies,
|
||||
install: true)
|
||||
|
||||
|
@ -156,16 +156,18 @@ cmd_lxc_update_config = configure_file(
|
||||
output: 'lxc-update-config')
|
||||
install_data(join_paths(project_build_root, 'src/lxc/cmd/lxc-update-config'), install_dir: bindir)
|
||||
|
||||
cmd_programs += executable(
|
||||
'init.lxc.static',
|
||||
cmd_lxc_init_sources,
|
||||
include_directories: liblxc_includes,
|
||||
link_with: [liblxc_static],
|
||||
link_args: ['-static'],
|
||||
c_args: ['-DNO_LXC_CONF'],
|
||||
dependencies: [libcap_static],
|
||||
install_dir: sbindir,
|
||||
install: true)
|
||||
if sanitize == 'none'
|
||||
cmd_programs += executable(
|
||||
'init.lxc.static',
|
||||
cmd_lxc_init_sources,
|
||||
include_directories: liblxc_includes,
|
||||
link_with: [liblxc_static],
|
||||
link_args: ['-static'],
|
||||
c_args: ['-DNO_LXC_CONF'],
|
||||
dependencies: [libcap_static],
|
||||
install_dir: sbindir,
|
||||
install: true)
|
||||
endif
|
||||
|
||||
cmd_programs += executable(
|
||||
'init.lxc',
|
||||
|
@ -141,13 +141,15 @@ liblxc_sources = files(
|
||||
'uuid.c',
|
||||
'uuid.h')
|
||||
|
||||
liblxc_static = static_library(
|
||||
'lxc_static',
|
||||
liblxc_sources + include_sources + netns_ifaddrs_sources,
|
||||
install: false,
|
||||
include_directories: liblxc_includes,
|
||||
dependencies: [threads],
|
||||
c_args: '-fvisibility=default')
|
||||
if sanitize == 'none'
|
||||
liblxc_static = static_library(
|
||||
'lxc_static',
|
||||
liblxc_sources + include_sources + netns_ifaddrs_sources,
|
||||
install: true,
|
||||
include_directories: liblxc_includes,
|
||||
dependencies: [threads],
|
||||
c_args: '-fvisibility=default')
|
||||
endif
|
||||
|
||||
lxc_functions = configure_file(
|
||||
configuration: conf,
|
||||
|
Loading…
Reference in New Issue
Block a user