refactor: sysroot部件化

close: #I5HF8S

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I58c0af9f97c5bdabef0744b8961fd42ef32eb38a
This commit is contained in:
arvinzzz
2022-07-19 14:30:37 +08:00
parent 661a341792
commit c9ec19fb24
4 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ version_info = [
write_file("$root_build_dir/etc/version-info", version_info)
group("prebuilts") {
public_deps = [ "//prebuilts/lite/sysroot" ]
public_deps = [ "//third_party/musl:sysroot_lite" ]
}
group("ohos") {
+2 -6
View File
@@ -78,8 +78,8 @@ ndk_toolchains("source") {
]
if (ohos_build_compiler == "clang") {
src_dir += [
"//prebuilts/lite/sysroot/usr/lib",
"//prebuilts/lite/sysroot/usr/include",
"$root_out_dir/sysroot/usr/lib",
"$root_out_dir/sysroot/usr/include",
]
dest_dir += [
"$root_out_dir/ndk/sysroot/usr/lib",
@@ -123,15 +123,11 @@ group("ndk_build") {
"//third_party/mbedtls:mbedtls_ndk",
"//third_party/wpa_supplicant/wpa_supplicant-2.9:wpa_supplicant",
]
if (ohos_build_type == "debug") {
deps += [ "//prebuilts/lite/sysroot/apidoc:lite_kernel_ndk" ]
}
} else {
deps += [
"$ohos_vendor_adapter_dir/hals/communication/wifi_lite/wifiservice:wifiservice_ndk",
"//base/hiviewdfx/hilog_lite/frameworks/mini:hilog_lite_ndk",
"//base/iot_hardware/peripheral:iothardware_ndk",
"//prebuilts/lite/sysroot/apidoc:lite_kernel_ndk",
]
}
}
+3 -3
View File
@@ -99,7 +99,7 @@ config("clang") {
"-mcpu=cortex-a7",
"-march=armv7-a",
"-mfloat-abi=softfp",
"--sysroot=${ohos_root_path}prebuilts/lite/sysroot",
"--sysroot=${root_out_dir}/sysroot",
]
cflags_cc = cflags
@@ -107,14 +107,14 @@ config("clang") {
ldflags += [
"-L../clang/arm-liteos-ohos/c++",
"-L../lite/sysroot/usr/lib/arm-liteos-ohos",
"-L${root_out_dir}/sysroot/usr/lib/arm-liteos-ohos",
"-L../clang/current/lib/arm-liteos-ohos",
"-L../clang/arm-liteos-ohos/c++",
"-lclang_rt.builtins",
"-lc",
"-lc++",
"-lc++abi",
"--sysroot=${ohos_root_path}prebuilts/lite/sysroot",
"--sysroot=${root_out_dir}/sysroot",
]
}
+1 -1
View File
@@ -50,7 +50,7 @@ declare_args() {
ohos_current_ld_command = ""
ohos_current_strip_command = ""
# Current sysroot path. E.g. "//prebuilts/lite/sysroot".
# Current sysroot path. E.g. "//out/hispark_taurus/ipcamera_hispark_taurus/sysroot".
ohos_current_sysroot = "$root_out_dir/sysroot"
}