mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-25 14:54:01 +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')
|
cgrouppattern = get_option('cgroup-pattern')
|
||||||
coverity = get_option('coverity-build')
|
coverity = get_option('coverity-build')
|
||||||
init_script = get_option('init-script')
|
init_script = get_option('init-script')
|
||||||
|
sanitize = get_option('b_sanitize')
|
||||||
want_examples = get_option('examples')
|
want_examples = get_option('examples')
|
||||||
want_io_uring = get_option('io-uring-event-loop')
|
want_io_uring = get_option('io-uring-event-loop')
|
||||||
want_pam_cgroup = get_option('pam-cgroup')
|
want_pam_cgroup = get_option('pam-cgroup')
|
||||||
@ -624,13 +625,18 @@ if want_io_uring
|
|||||||
liblxc_dependencies += [liburing]
|
liblxc_dependencies += [liburing]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
liblxc_link_whole = []
|
||||||
|
if sanitize == 'none'
|
||||||
|
liblxc_link_whole = [liblxc_static]
|
||||||
|
endif
|
||||||
|
|
||||||
liblxc = shared_library(
|
liblxc = shared_library(
|
||||||
'lxc',
|
'lxc',
|
||||||
version: liblxc_version,
|
version: liblxc_version,
|
||||||
include_directories: liblxc_includes,
|
include_directories: liblxc_includes,
|
||||||
link_args: ['-DPIC'],
|
link_args: ['-DPIC'],
|
||||||
c_args: ['-DPIC'],
|
c_args: ['-DPIC'],
|
||||||
link_whole: [liblxc_static],
|
link_whole: liblxc_link_whole,
|
||||||
dependencies: liblxc_dependencies,
|
dependencies: liblxc_dependencies,
|
||||||
install: true)
|
install: true)
|
||||||
|
|
||||||
|
@ -156,16 +156,18 @@ cmd_lxc_update_config = configure_file(
|
|||||||
output: 'lxc-update-config')
|
output: 'lxc-update-config')
|
||||||
install_data(join_paths(project_build_root, 'src/lxc/cmd/lxc-update-config'), install_dir: bindir)
|
install_data(join_paths(project_build_root, 'src/lxc/cmd/lxc-update-config'), install_dir: bindir)
|
||||||
|
|
||||||
cmd_programs += executable(
|
if sanitize == 'none'
|
||||||
'init.lxc.static',
|
cmd_programs += executable(
|
||||||
cmd_lxc_init_sources,
|
'init.lxc.static',
|
||||||
include_directories: liblxc_includes,
|
cmd_lxc_init_sources,
|
||||||
link_with: [liblxc_static],
|
include_directories: liblxc_includes,
|
||||||
link_args: ['-static'],
|
link_with: [liblxc_static],
|
||||||
c_args: ['-DNO_LXC_CONF'],
|
link_args: ['-static'],
|
||||||
dependencies: [libcap_static],
|
c_args: ['-DNO_LXC_CONF'],
|
||||||
install_dir: sbindir,
|
dependencies: [libcap_static],
|
||||||
install: true)
|
install_dir: sbindir,
|
||||||
|
install: true)
|
||||||
|
endif
|
||||||
|
|
||||||
cmd_programs += executable(
|
cmd_programs += executable(
|
||||||
'init.lxc',
|
'init.lxc',
|
||||||
|
@ -141,13 +141,15 @@ liblxc_sources = files(
|
|||||||
'uuid.c',
|
'uuid.c',
|
||||||
'uuid.h')
|
'uuid.h')
|
||||||
|
|
||||||
liblxc_static = static_library(
|
if sanitize == 'none'
|
||||||
'lxc_static',
|
liblxc_static = static_library(
|
||||||
liblxc_sources + include_sources + netns_ifaddrs_sources,
|
'lxc_static',
|
||||||
install: false,
|
liblxc_sources + include_sources + netns_ifaddrs_sources,
|
||||||
include_directories: liblxc_includes,
|
install: true,
|
||||||
dependencies: [threads],
|
include_directories: liblxc_includes,
|
||||||
c_args: '-fvisibility=default')
|
dependencies: [threads],
|
||||||
|
c_args: '-fvisibility=default')
|
||||||
|
endif
|
||||||
|
|
||||||
lxc_functions = configure_file(
|
lxc_functions = configure_file(
|
||||||
configuration: conf,
|
configuration: conf,
|
||||||
|
Loading…
Reference in New Issue
Block a user