source_set

Signed-off-by: songhao <songhonghao@huawei.com>
This commit is contained in:
songhao 2022-04-13 10:56:16 +08:00
parent 66c4b165b0
commit 0915f30c6a
5 changed files with 63 additions and 29 deletions

View File

@ -546,7 +546,7 @@ source_set("libark_jsruntime_static") {
}
}
ohos_shared_library("libark_jsruntime") {
source_set("libark_jsruntime_set_static") {
if (is_mingw) {
ldflags = [ "-lshlwapi" ]
}
@ -554,6 +554,10 @@ ohos_shared_library("libark_jsruntime") {
":libark_js_intl_static",
":libark_jsruntime_static",
]
}
ohos_shared_library("libark_jsruntime") {
deps = [ ":libark_jsruntime_set_static" ]
defines = []
if (!is_linux && !is_mingw && !is_mac) {
@ -602,8 +606,8 @@ source_set("libark_jsruntime_test_static") {
]
}
ohos_shared_library("libark_jsruntime_test") {
configs = [
source_set("libark_jsruntime_test_set_static") {
public_configs = [
"//ark/js_runtime:ark_jsruntime_common_config",
"//ark/js_runtime:ark_jsruntime_public_config",
"$ark_root/runtime:arkruntime_public_config",
@ -611,6 +615,16 @@ ohos_shared_library("libark_jsruntime_test") {
deps = [ ":libark_jsruntime_test_static" ]
if (is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime_static" ]
} else {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_shared_library("libark_jsruntime_test") {
deps = [ ":libark_jsruntime_test_set_static" ]
defines = []
if (!is_linux && !is_mingw && !is_mac) {
if (build_public_version && enable_bytrace) {
@ -619,12 +633,6 @@ ohos_shared_library("libark_jsruntime_test") {
}
}
if (is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime_static" ]
} else {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
output_extension = "so"
subsystem_name = "test"
}

View File

@ -143,7 +143,7 @@ source_set("libark_jsoptimizer_static") {
]
}
ohos_shared_library("libark_jsoptimizer") {
source_set("libark_jsoptimizer_set_static") {
deps = [
":libark_jsoptimizer_static",
"//ark/js_runtime:libark_jsruntime",
@ -152,6 +152,10 @@ ohos_shared_library("libark_jsoptimizer") {
if (compile_llvm_online) {
deps += [ ":build_llvm_libs" ]
}
}
ohos_shared_library("libark_jsoptimizer") {
deps = [ ":libark_jsoptimizer_set_static" ]
install_enable = true
part_name = "ark_js_runtime"
@ -163,7 +167,7 @@ ohos_shared_library("libark_jsoptimizer") {
subsystem_name = "ark"
}
ohos_shared_library("libark_jsoptimizer_test") {
source_set("libark_jsoptimizer_test_static") {
deps = [
":libark_jsoptimizer_static",
"//ark/js_runtime:libark_jsruntime_test_static",
@ -178,6 +182,10 @@ ohos_shared_library("libark_jsoptimizer_test") {
if (compile_llvm_online) {
deps += [ ":build_llvm_libs" ]
}
}
ohos_shared_library("libark_jsoptimizer_test") {
deps = [ ":libark_jsoptimizer_test_static" ]
output_extension = "so"
subsystem_name = "test"
@ -190,11 +198,11 @@ ark_gen_file("stub_aot_options_gen_h") {
output_file = "$target_gen_dir/generated/stub_aot_options_gen.h"
}
ohos_executable("ark_stub_compiler") {
source_set("ark_stub_compiler_static") {
sources = [ "stub_compiler.cpp" ]
include_dirs = [ "$target_gen_dir" ]
configs = [
public_configs = [
":include_llvm",
"//ark/js_runtime:ark_jsruntime_compiler_config",
"//ark/js_runtime:ark_jsruntime_public_config",
@ -211,6 +219,10 @@ ohos_executable("ark_stub_compiler") {
if (!is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_executable("ark_stub_compiler") {
deps = [ ":ark_stub_compiler_static" ]
part_name = "ark_js_runtime"
install_enable = false
@ -219,14 +231,14 @@ ohos_executable("ark_stub_compiler") {
subsystem_name = "ark"
}
ohos_executable("ark_aot_compiler") {
source_set("ark_aot_compiler_static") {
sources = [
"aot_compiler.cpp",
"pass_manager.cpp",
"slowpath_lowering.cpp",
]
configs = [
public_configs = [
":include_llvm",
"//ark/js_runtime:ark_jsruntime_compiler_config",
"//ark/js_runtime:ark_jsruntime_public_config",
@ -242,6 +254,10 @@ ohos_executable("ark_aot_compiler") {
if (!is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_executable("ark_aot_compiler") {
deps = [ ":ark_aot_compiler_static" ]
part_name = "ark_js_runtime"
install_enable = false

View File

@ -14,10 +14,10 @@
import("//ark/js_runtime/js_runtime_config.gni")
import("//build/ohos.gni")
ohos_executable("ark_js_vm") {
source_set("ark_js_vm_static") {
sources = [ "main.cpp" ]
configs = [
public_configs = [
"//ark/js_runtime:ark_jsruntime_common_config",
"//ark/js_runtime:ark_jsruntime_public_config",
"$ark_root/runtime:arkruntime_public_config",
@ -31,6 +31,10 @@ ohos_executable("ark_js_vm") {
if (!is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_executable("ark_js_vm") {
deps = [ ":ark_js_vm_static" ]
part_name = "ark_js_runtime"
install_enable = false

View File

@ -26,7 +26,6 @@ config("ark_ecma_debugger_config") {
debugger_sources = [
"agent/debugger_impl.cpp",
"agent/heapprofiler_impl.cpp",
"agent/js_backend.cpp",
"agent/js_pt_hooks.cpp",
"agent/runtime_impl.cpp",

View File

@ -56,10 +56,10 @@ ts2abc_gen_abc("ark_exception_abc") {
out_puts = [ test_abc_path ]
}
ohos_shared_library("debugger_entry") {
source_set("debugger_entry_static") {
sources = [ "entry/test_debugger_entry.cpp" ]
configs = [ ":debug_api_test" ]
public_configs = [ ":debug_api_test" ]
deps = [
":ark_exception_abc",
@ -72,12 +72,16 @@ ohos_shared_library("debugger_entry") {
if (!is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_shared_library("debugger_entry") {
deps = [ ":debugger_entry_static" ]
output_extension = "so"
subsystem_name = "test"
}
ohos_shared_library("jsdebugtest") {
source_set("jsdebugtest_static") {
sources = [
"utils/test_entry.cpp",
"utils/test_extractor.cpp",
@ -85,7 +89,7 @@ ohos_shared_library("jsdebugtest") {
"utils/testcases/test_list.cpp",
]
configs = [ ":debug_api_test" ]
public_configs = [ ":debug_api_test" ]
deps = [
"$ark_root/libpandabase:libarkbase",
@ -94,18 +98,21 @@ ohos_shared_library("jsdebugtest") {
"//ark/js_runtime/ecmascript/tooling:libark_ecma_debugger_test_static",
]
if (!is_linux && !is_mingw && !is_mac) {
if (build_public_version) {
external_deps = [ "bytrace_standard:bytrace_core" ]
}
}
if (is_standard_system) {
deps += [ "$ark_root/runtime:libarkruntime_static" ]
} else {
deps += [ "$ark_root/runtime:libarkruntime" ]
}
}
ohos_shared_library("jsdebugtest") {
deps = [ ":jsdebugtest_static" ]
if (!is_linux && !is_mingw && !is_mac) {
if (build_public_version) {
external_deps = [ "bytrace_standard:bytrace_core" ]
}
}
output_extension = "so"
subsystem_name = "test"
}