diff --git a/BUILD.gn b/BUILD.gn index 852844956b..84aaa9f091 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -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" } diff --git a/ecmascript/compiler/BUILD.gn b/ecmascript/compiler/BUILD.gn index b5e119be31..4f42e1627b 100644 --- a/ecmascript/compiler/BUILD.gn +++ b/ecmascript/compiler/BUILD.gn @@ -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 diff --git a/ecmascript/js_vm/BUILD.gn b/ecmascript/js_vm/BUILD.gn index c0f2b317c0..3d7080a437 100644 --- a/ecmascript/js_vm/BUILD.gn +++ b/ecmascript/js_vm/BUILD.gn @@ -9,15 +9,15 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. +# limitations under the License. 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 diff --git a/ecmascript/tooling/BUILD.gn b/ecmascript/tooling/BUILD.gn index d59e41f23b..6921fadce8 100644 --- a/ecmascript/tooling/BUILD.gn +++ b/ecmascript/tooling/BUILD.gn @@ -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", diff --git a/ecmascript/tooling/test/BUILD.gn b/ecmascript/tooling/test/BUILD.gn index 05d7e2b2e0..b60e9e3167 100644 --- a/ecmascript/tooling/test/BUILD.gn +++ b/ecmascript/tooling/test/BUILD.gn @@ -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" }