!2711 【init】部件独立编译

Merge pull request !2711 from lijunru/410
This commit is contained in:
openharmony_ci 2024-05-23 14:03:08 +00:00 committed by Gitee
commit 3b5e4dab37
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 22 additions and 10 deletions

View File

@ -179,6 +179,14 @@
]
},
"name": "//base/startup/init/interfaces/innerkits/zh_extral_dir:export_headers_lib"
},
{
"header": {
"header_base": "//base/startup/init/services/param/base",
"header_files": []
},
"name": "//base/startup/init/services/param/base:parameterbase",
"visibility": [ "musl" ]
}
],
"test": [

View File

@ -48,11 +48,16 @@ base_include_dirs = [
if (defined(ohos_lite)) {
static_library("parameterbase") {
cflags = [ "-fPIC" ]
sources = comm_sources
sources += [
"//base/startup/init/services/log/init_commlog.c",
"//base/startup/init/services/param/base/param_base.c",
]
if (ohos_kernel_type == "liteos_m") {
sources = []
not_needed([ "comm_sources" ])
} else {
sources = comm_sources
sources += [
"//base/startup/init/services/log/init_commlog.c",
"//base/startup/init/services/param/base/param_base.c",
]
}
include_dirs = base_include_dirs
include_dirs += [ "//third_party/bounds_checking_function/include" ]
defines = [ "_GNU_SOURCE" ]
@ -87,7 +92,6 @@ if (defined(ohos_lite)) {
inherited_configs = [
"//build/config/compiler:afdo",
"//build/config/compiler:afdo_optimize_size",
"//build/config/compiler:compiler",
"//build/config/compiler:compiler_arm_fpu",
"//build/config/compiler:compiler_arm_thumb",
"//build/config/compiler:chromium_code",
@ -99,12 +103,11 @@ if (defined(ohos_lite)) {
"//build/config/compiler:no_exceptions",
"//build/config/compiler:no_rtti",
"//build/config/compiler:runtime_library",
"//build/config/compiler:thin_archive",
"//build/config/sanitizers:default_sanitizer_flags",
]
}
source_set("parameterbase") {
ohos_static_library("parameterbase") {
sources = comm_sources
sources += [
"//base/startup/init/services/param/adapter/param_dac.c",
@ -130,8 +133,7 @@ if (defined(ohos_lite)) {
}
if (!startup_init_with_param_base) {
ldflags = [ "-nostdlib" ]
configs -= inherited_configs
configs += [ "//build/config/compiler:compiler" ]
remove_configs = inherited_configs
defines += [ "PARAM_BASE" ]
} else {
sources += [ "//base/startup/init/services/log/init_commlog.c" ]
@ -149,6 +151,8 @@ if (defined(ohos_lite)) {
if (param_base_log) {
defines += [ "PARAM_BASE_LOG" ]
}
part_name = "init"
subsystem_name = "startup"
}
# extend for base