未验证 提交 3ef832e6 编写于 作者: O openharmony_ci 提交者: Gitee

!603 编译框架支持UniProton内核

Merge pull request !603 from zhushengle/uniproton
...@@ -90,6 +90,12 @@ group("ohos") { ...@@ -90,6 +90,12 @@ group("ohos") {
"//kernel/liteos_m:build_kernel_image") { "//kernel/liteos_m:build_kernel_image") {
deps += [ component_target ] deps += [ component_target ]
} }
} else if (product_configed_component.component ==
"uniproton") {
if (component_target !=
"//kernel/uniproton:build_kernel_image") {
deps += [ component_target ]
}
} else { } else {
deps += [ component_target ] deps += [ component_target ]
} }
......
...@@ -37,6 +37,11 @@ config("kernel_macros") { ...@@ -37,6 +37,11 @@ config("kernel_macros") {
"__LITEOS__", "__LITEOS__",
"__LITEOS_M__", "__LITEOS_M__",
] ]
} else if (ohos_kernel_type == "uniproton") {
defines = [
"__uniproton__",
"__UNIPROTON__",
]
} else if (ohos_kernel_type == "linux") { } else if (ohos_kernel_type == "linux") {
defines = [ defines = [
"__linux__", "__linux__",
......
...@@ -41,7 +41,8 @@ if (defined(board_configed_sysroot) && board_configed_sysroot != "") { ...@@ -41,7 +41,8 @@ if (defined(board_configed_sysroot) && board_configed_sysroot != "") {
} }
# Only gcc available for liteos_m. # Only gcc available for liteos_m.
if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "linux") { if (ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton" ||
ohos_kernel_type == "linux") {
use_board_toolchain = true use_board_toolchain = true
} }
...@@ -154,7 +155,7 @@ default_shared_library_configs = ...@@ -154,7 +155,7 @@ default_shared_library_configs =
default_target_configs + [ "//build/lite/config:shared_library_config" ] default_target_configs + [ "//build/lite/config:shared_library_config" ]
default_static_library_configs = default_target_configs default_static_library_configs = default_target_configs
default_executable_configs = default_static_library_configs default_executable_configs = default_static_library_configs
if (ohos_kernel_type != "liteos_m") { if (ohos_kernel_type != "liteos_m" && ohos_kernel_type != "uniproton") {
default_static_library_configs += [ "//build/lite/config:static_pie_config" ] default_static_library_configs += [ "//build/lite/config:static_pie_config" ]
default_executable_configs += [ "//build/lite/config:static_pie_config" ] default_executable_configs += [ "//build/lite/config:static_pie_config" ]
default_executable_configs += [ "//build/lite/config:pie_executable_config" ] default_executable_configs += [ "//build/lite/config:pie_executable_config" ]
......
...@@ -19,7 +19,8 @@ template("lite_library") { ...@@ -19,7 +19,8 @@ template("lite_library") {
target_type = invoker.target_type target_type = invoker.target_type
shared_lib = target_type == "shared_library" shared_lib = target_type == "shared_library"
if (shared_lib && ohos_kernel_type == "liteos_m") { if (shared_lib &&
(ohos_kernel_type == "liteos_m" || ohos_kernel_type == "uniproton")) {
group(target_name) { group(target_name) {
if (defined(invoker.sources)) { if (defined(invoker.sources)) {
assert(invoker.sources != "") assert(invoker.sources != "")
...@@ -57,7 +58,8 @@ template("lite_library") { ...@@ -57,7 +58,8 @@ template("lite_library") {
if (shared_lib) { if (shared_lib) {
cflags += [ "-fPIC" ] cflags += [ "-fPIC" ]
cflags_cc += [ "-fPIC" ] cflags_cc += [ "-fPIC" ]
} else if (!shared_lib && ohos_kernel_type != "liteos_m") { } else if (!shared_lib && (ohos_kernel_type != "liteos_m" &&
ohos_kernel_type != "uniproton")) {
cflags += [ "-fPIE" ] cflags += [ "-fPIE" ]
cflags_cc += [ "-fPIE" ] cflags_cc += [ "-fPIE" ]
} }
......
...@@ -64,7 +64,7 @@ if (product_config_path != "") { ...@@ -64,7 +64,7 @@ if (product_config_path != "") {
board_name = product_config.board board_name = product_config.board
device_company = product_config.device_company device_company = product_config.device_company
# Supported kernel: "liteos_a", "liteos_m", "linux" # Supported kernel: "liteos_a", "liteos_m", "linux", "uniproton"
ohos_kernel_type = product_config.kernel_type ohos_kernel_type = product_config.kernel_type
if (defined(product_config.kernel_is_prebuilt)) { if (defined(product_config.kernel_is_prebuilt)) {
ohos_kernel_is_prebuilt = product_config.kernel_is_prebuilt ohos_kernel_is_prebuilt = product_config.kernel_is_prebuilt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册