mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
musl: meson: allow to choose libc implementation
This also introduces skeleton directories for storing musl specific code.
This commit is contained in:
14
meson.build
14
meson.build
@@ -72,7 +72,10 @@ conf.set10('SD_BOOT', false)
|
||||
|
||||
# Create a title-less summary section early, so it ends up first in the output.
|
||||
# More items are added later after they have been detected.
|
||||
summary({'build mode' : get_option('mode')})
|
||||
summary({
|
||||
'libc' : get_option('libc'),
|
||||
'build mode' : get_option('mode'),
|
||||
})
|
||||
|
||||
#####################################################################
|
||||
|
||||
@@ -2069,6 +2072,15 @@ system_includes = [
|
||||
),
|
||||
]
|
||||
|
||||
if get_option('libc') == 'musl'
|
||||
system_include_args = [
|
||||
'-isystem', meson.project_build_root() / 'src/include/musl',
|
||||
'-isystem', meson.project_source_root() / 'src/include/musl',
|
||||
] + system_include_args
|
||||
|
||||
system_includes += include_directories('src/include/musl', is_system : true)
|
||||
endif
|
||||
|
||||
basic_includes = [
|
||||
include_directories(
|
||||
'src/basic',
|
||||
|
||||
@@ -402,6 +402,8 @@ option('ima', type : 'boolean',
|
||||
option('ipe', type : 'boolean',
|
||||
description : 'IPE support')
|
||||
|
||||
option('libc', type : 'combo', choices : ['glibc', 'musl'],
|
||||
description : 'libc implementation to be used')
|
||||
option('acl', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
description : 'libacl support')
|
||||
option('audit', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
|
||||
|
||||
@@ -16,6 +16,8 @@ libc_wrapper_sources = files(
|
||||
'xattr.c',
|
||||
)
|
||||
|
||||
subdir('musl')
|
||||
|
||||
sources += libc_wrapper_sources
|
||||
|
||||
libc_wrapper_static = static_library(
|
||||
|
||||
5
src/libc/musl/meson.build
Normal file
5
src/libc/musl/meson.build
Normal file
@@ -0,0 +1,5 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if get_option('libc') != 'musl'
|
||||
subdir_done()
|
||||
endif
|
||||
Reference in New Issue
Block a user