From 7dda4214daf488e276ac0f43c749a4694a201009 Mon Sep 17 00:00:00 2001 From: DreamConnected <1487442471@qq.com> Date: Fri, 1 Aug 2025 19:20:49 +0800 Subject: [PATCH 1/2] meson.build: add liblog as a runtime library Signed-off-by: DreamConnected <1487442471@qq.com> --- .github/workflows/main.yml | 1 - meson.build | 23 +++++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 51ee56f93f..8c8a706f3e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,7 +73,6 @@ jobs: -Dapparmor=true \ -Dopenssl=true \ -Ddbus=false \ - -Ddbus=false \ -Dandroid-log=true \ --cross-file aarch64-android-api30.txt diff --git a/meson.build b/meson.build index 590047533a..86f22db9a1 100644 --- a/meson.build +++ b/meson.build @@ -266,7 +266,19 @@ if add_languages('cpp', required : want_oss_fuzz) add_project_arguments(cxx.get_supported_arguments(basic_disabled_warnings), language : 'cpp') endif +## Android +have = cc.get_id().contains('clang') and cc.has_header('android/log.h') +srcconf.set10('IS_BIONIC', have) + # Feature detection +## Android Log System. +if want_android_log + liblog = cc.find_library('log', required: true) + pkgconfig_libs += liblog + liblxc_dependencies += liblog + srcconf.set10('USE_ANDROID_LOG', liblog.found()) +endif + ## I/O uring. if want_io_uring liburing = dependency('liburing') @@ -428,7 +440,7 @@ if want_capabilities code = ''' int main(int argc, char *argv[]) { return 0; }; ''' - if libcap_static.found() + if libcap_static.found() and not IS_BIONIC libcap_static_linkable = cc.links(code, args: '-static', dependencies: libcap_static) else libcap_static_linkable = false @@ -461,15 +473,6 @@ pkgconfig_libs += pam have = cc.has_function('fmemopen', prefix: '#include ', args: '-D_GNU_SOURCE') srcconf.set10('HAVE_FMEMOPEN', have) -## Android -have = cc.get_id().contains('clang') and cc.has_header('android/log.h') -srcconf.set10('IS_BIONIC', have) -if want_android_log - liblog = cc.find_library('log') - liblxc_dependencies += liblog - srcconf.set10('USE_ANDROID_LOG', liblog.found()) -endif - have = cc.has_function('openpty', dependencies: libutil, prefix: '#include ') srcconf.set10('HAVE_OPENPTY', have) if have From 1d0d1fbdd11cac68f785069b617446a43ba4eca0 Mon Sep 17 00:00:00 2001 From: DreamConnected <1487442471@qq.com> Date: Fri, 1 Aug 2025 19:50:03 +0800 Subject: [PATCH 2/2] CI code-test.yml: only on pull_request Signed-off-by: DreamConnected <1487442471@qq.com> --- .github/workflows/code-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/code-test.yml b/.github/workflows/code-test.yml index 5de7da7c57..585cd59b8e 100644 --- a/.github/workflows/code-test.yml +++ b/.github/workflows/code-test.yml @@ -1,6 +1,5 @@ name: Tests on: - - push - pull_request jobs: