diff --git a/test/test_helper.gni b/test/test_helper.gni index a2f9e516ea7467ee480b0e3be31fc9f9d766af55..9f6f9f1c7a9283047561197de8e58ae4d2562b82 100644 --- a/test/test_helper.gni +++ b/test/test_helper.gni @@ -54,6 +54,7 @@ template("host_unittest_action") { rebase_path(_root_out_dir_) + "/arkcompiler/ets_runtime:" + rebase_path(_root_out_dir_) + "/test/test:" + rebase_path(_root_out_dir_) + "/${_icu_path_}:" + + rebase_path(_root_out_dir_) + "/thirdparty/cjson:" + rebase_path(_root_out_dir_) + "/thirdparty/libuv:" + rebase_path("//prebuilts/clang/ohos/linux-x86_64/llvm/lib/"), "--timeout-limit", diff --git a/tooling/BUILD.gn b/tooling/BUILD.gn index d779f558900b4bc9d9460056fddd26cb7da36c68..13185d89af13ee61b0018ba8c009b59bec0d8ca5 100644 --- a/tooling/BUILD.gn +++ b/tooling/BUILD.gn @@ -14,6 +14,9 @@ import("//arkcompiler/ets_runtime/js_runtime_config.gni") import("//build/ohos.gni") +is_cross_platform_build = + defined(build_cross_platform_version) && build_cross_platform_version + config("ark_ecma_debugger_config") { configs = [ "//arkcompiler/ets_runtime:ark_jsruntime_common_config", @@ -58,10 +61,15 @@ source_set("libark_ecma_debugger_set") { deps = [ "$ark_root/libpandafile:arkfile_header_deps", - "//third_party/cJSON:cjson_static", "//third_party/libuv:uv", ] + if (is_cross_platform_build) { + deps += [ "//third_party/cJSON:cjson_static" ] + } else { + deps += [ "//third_party/cJSON:cjson" ] + } + if (is_mingw || is_mac) { if (is_mingw) { platform = "windows" @@ -136,9 +144,14 @@ source_set("libark_ecma_debugger_test_set") { deps = [ "$ark_root/libpandafile:arkfile_header_deps", - "//third_party/cJSON:cjson_static", "//third_party/libuv:uv", ] + + if (is_cross_platform_build) { + deps += [ "//third_party/cJSON:cjson_static" ] + } else { + deps += [ "//third_party/cJSON:cjson" ] + } } ohos_shared_library("libark_ecma_debugger_test") { diff --git a/tooling/test/BUILD.gn b/tooling/test/BUILD.gn index 730acd777d129973f222e960d35311ce2093ec70..7f3074367dbc27db094c877070c30fbfdb639565 100644 --- a/tooling/test/BUILD.gn +++ b/tooling/test/BUILD.gn @@ -183,6 +183,7 @@ host_unittest_action("DebuggerTest") { deps = [ "//arkcompiler/ets_runtime:libark_jsruntime_test", "//arkcompiler/toolchain/tooling:libark_ecma_debugger_test", + "//third_party/cJSON:cjson", sdk_libc_secshared_dep, ] }