提交 4a39f3ff 编写于 作者: O openharmony_ci 提交者: Gitee

!102 IssueNo:#I3NCGM 【L1 Linux开源】开源编译构建

Merge pull request !102 from yangming_ha/master
......@@ -112,20 +112,28 @@ config("pie_executable_config") {
ldflags = [ "-pie" ]
}
config("ohos_clang") {
clang_dir = ""
clang_dir = ""
target_kernel = ""
if(ohos_current_toolchain == "ohos_clang") {
if (ohos_build_compiler_dir != "") {
clang_dir = rebase_path("${ohos_build_compiler_dir}")
}
target_kernel = ""
if (ohos_kernel_type == "liteos_a") {
target_kernel = "arm-liteos"
} else if (ohos_kernel_type == "linux") {
target_kernel = "arm-linux-musl"
defines = [ "_LIBCPP_HAS_MUSL_LIBC" ]
}
copy("ohos_clang_runtime") {
sources = [
"${clang_dir}/lib/${target_kernel}/c++/libc++.so",
"${ohos_root_path}prebuilts/lite/sysroot/usr/lib/${target_kernel}/libc.so",
]
outputs = [ "$root_out_dir/libs/{{source_file_part}}" ]
}
}
config("ohos_clang") {
include_dirs = [
"${clang_dir}/include/c++/v1",
"//prebuilts/lite/sysroot/usr/include/${target_kernel}",
......@@ -137,6 +145,9 @@ config("ohos_clang") {
]
cflags_cc = cflags
ldflags = cflags
if (ohos_kernel_type == "linux") {
defines = [ "_LIBCPP_HAS_MUSL_LIBC" ]
}
ldflags += [
"-L${clang_dir}/lib/${target_kernel}/c++",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册