diff --git a/abc2program/BUILD.gn b/abc2program/BUILD.gn index 5824fabfeb341c24767814bafd8cbd1a8e232a64..0335750573b567539c5fe2c40d694ceada5c744e 100644 --- a/abc2program/BUILD.gn +++ b/abc2program/BUILD.gn @@ -69,6 +69,10 @@ ohos_shared_library("abc2program") { "$ark_root/libpandafile:libarkfile", ] + if (enable_hilog) { + external_deps = [ "hilog:libhilog" ] + } + if (!is_standard_system) { relative_install_dir = "ark" } @@ -101,6 +105,9 @@ ohos_static_library("abc2program_frontend_static") { "$ark_root/libpandafile:libarkfile_frontend_static", ] external_deps = [ "bounds_checking_function:libsec_static" ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" } @@ -127,6 +134,10 @@ ohos_executable("abc2prog") { "$ark_root/libpandafile:libarkfile_frontend_static", ] + if (enable_hilog) { + external_deps = [ "hilog:libhilog" ] + } + libs = platform_libs if (!is_mac && !is_mingw) { ldflags = platform_ldflags diff --git a/assembler/BUILD.gn b/assembler/BUILD.gn index bb7a3fedbd24d215c6311f2267cf3eec5a3ab1e4..ff11eadab7216880d3cc20771532e6f91340e26a 100644 --- a/assembler/BUILD.gn +++ b/assembler/BUILD.gn @@ -85,6 +85,10 @@ ohos_static_library("libarkassembler_static") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } + deps += plugin_deps part_name = "runtime_core" @@ -127,6 +131,10 @@ ohos_source_set("libarkassembler_frontend_set_static") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } + deps += plugin_deps part_name = "runtime_core" @@ -164,6 +172,10 @@ ohos_source_set("ark_asm_static") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } + libs = platform_libs if (!is_mac && !is_mingw) { ldflags = platform_ldflags diff --git a/assembler/tests/BUILD.gn b/assembler/tests/BUILD.gn index 6a4c578b9d3d18f34d7b0db42e355a1b64104931..762e98c55189fda62d4a68ac63cffb373c85abef 100644 --- a/assembler/tests/BUILD.gn +++ b/assembler/tests/BUILD.gn @@ -86,6 +86,9 @@ host_unittest_action("AssemblerTest") { ] external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } test_abc_dir = rebase_path(target_out_dir) defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ] foreach(file, assembler_test_js_files) { diff --git a/bytecode_optimizer/BUILD.gn b/bytecode_optimizer/BUILD.gn index bcfb5b11d7fa274ea8e9f94b39efa2d8db1bdca8..e7540c01fa698d2c2bf8b1d52b66fc0ee3b091de 100644 --- a/bytecode_optimizer/BUILD.gn +++ b/bytecode_optimizer/BUILD.gn @@ -67,6 +67,10 @@ ohos_shared_library("libarkbytecodeopt") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + relative_install_dir = "ark" output_extension = "so" part_name = "runtime_core" @@ -95,6 +99,9 @@ ohos_static_library("libarkbytecodeopt_frontend_static") { ] external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" diff --git a/bytecode_optimizer/tests/BUILD.gn b/bytecode_optimizer/tests/BUILD.gn index 9b5d9f476ec9b19a82daaafea9c24fe951e7571a..707a637ad68291ae94478f222e8edc7a3b62fa88 100644 --- a/bytecode_optimizer/tests/BUILD.gn +++ b/bytecode_optimizer/tests/BUILD.gn @@ -94,6 +94,9 @@ host_unittest_action("BytecodeOptimizerTest") { configs = bcopt_test_config deps = bcopt_test_deps external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } test_abc_dir = rebase_path(target_out_dir) defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ] diff --git a/compiler/BUILD.gn b/compiler/BUILD.gn index 5ebd0873ed5d56405a403e96b45b7351fd70ef40..f4747711a6e86faef961855ece3964dafe2c1755 100644 --- a/compiler/BUILD.gn +++ b/compiler/BUILD.gn @@ -138,6 +138,10 @@ ohos_shared_library("libarkcompiler") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + include_dirs = [ "$ark_root/compiler/optimizer" ] output_extension = "so" @@ -197,6 +201,9 @@ ohos_static_library("libarkcompiler_frontend_static") { deps = libarkcompiler_frontend_static_common_deps external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } include_dirs = [ "$ark_root/compiler/optimizer" ] @@ -217,6 +224,10 @@ ohos_static_library( external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + include_dirs = [ "$ark_root/compiler/optimizer" ] part_name = "runtime_core" diff --git a/compiler/tests/BUILD.gn b/compiler/tests/BUILD.gn index b2708375e747802ffe7e55e931258cd1faab1795..5e95ae5693bea1b08294c433fe271e194faec2fa 100644 --- a/compiler/tests/BUILD.gn +++ b/compiler/tests/BUILD.gn @@ -100,6 +100,10 @@ host_unittest_action("GraphInterfaceTest") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + test_abc_dir = rebase_path(target_out_dir) defines = [ "GRAPH_TEST_ABC_DIR=\"${test_abc_dir}/\"" ] @@ -120,6 +124,10 @@ host_unittest_action("DrawCfgToolTest") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + test_abc_dir = rebase_path(target_out_dir) tools_dir = rebase_path("$ark_root/compiler/tools") diff --git a/disassembler/BUILD.gn b/disassembler/BUILD.gn index 3444824205e7fd4da4300b085d49a7e2b095b5ee..daac9caa84b06d4a90a1ebdfcc291f9a5c83b1d7 100644 --- a/disassembler/BUILD.gn +++ b/disassembler/BUILD.gn @@ -75,6 +75,10 @@ ohos_shared_library("arkdisassembler") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + if (!is_standard_system) { relative_install_dir = "ark" } @@ -111,6 +115,10 @@ ohos_static_library("arkdisassembler_frontend_static") { ] external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + part_name = "runtime_core" subsystem_name = "arkcompiler" } @@ -139,6 +147,10 @@ ohos_executable("ark_disasm") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + libs = platform_libs if (!is_mac && !is_mingw) { ldflags = platform_ldflags diff --git a/libark_defect_scan_aux/BUILD.gn b/libark_defect_scan_aux/BUILD.gn index 80cc58679ff6b4245b5eaa4343b027adf022910a..e4c5bb5f1bb9c599e3727513be3379297523985c 100644 --- a/libark_defect_scan_aux/BUILD.gn +++ b/libark_defect_scan_aux/BUILD.gn @@ -72,6 +72,10 @@ ohos_shared_library("libark_defect_scan_aux") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + output_extension = "so" relative_install_dir = "ark" part_name = "runtime_core" @@ -93,6 +97,10 @@ ohos_static_library("libark_defect_scan_aux_static_test") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + part_name = "runtime_core" subsystem_name = "arkcompiler" } diff --git a/libpandabase/BUILD.gn b/libpandabase/BUILD.gn index 3673220598eb0316b6c835be5a5709903932e9f2..df40a7b5e7f86f25243e286255a5f9a19a059cab 100644 --- a/libpandabase/BUILD.gn +++ b/libpandabase/BUILD.gn @@ -21,10 +21,6 @@ config("arkbase_public_config") { "$target_gen_dir", ] - if (enable_hilog) { - include_dirs += [ "$hilog_root/include" ] - } - include_dirs += platform_include_dirs } @@ -184,6 +180,9 @@ ohos_source_set("libarkbase_static_fuzz") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" } @@ -227,6 +226,9 @@ ohos_source_set("libarkbase_frontend_set_static") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" } diff --git a/libpandabase/tests/BUILD.gn b/libpandabase/tests/BUILD.gn index 12ca19d042384dfb2036ba52b7ca75ca257adf2d..6cbb902a9cbc251475847d0b454475f0220755b3 100644 --- a/libpandabase/tests/BUILD.gn +++ b/libpandabase/tests/BUILD.gn @@ -61,6 +61,9 @@ host_unittest_action("LibPandaBaseTest") { deps = [ "$ark_root/libpandabase:libarkbase_static" ] external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } } group("unittest") { diff --git a/libpandafile/BUILD.gn b/libpandafile/BUILD.gn index 6bcf4b70842a476494b8455900836141e110b763..a8385f4d667d8dc0b2f7b30cdf059b905530d73c 100644 --- a/libpandafile/BUILD.gn +++ b/libpandafile/BUILD.gn @@ -166,6 +166,9 @@ source_set("libarkfile_static_verifier") { "zlib:shared_libz", sdk_libc_secshared_dep, ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } } ohos_shared_library("libarkfile") { @@ -200,6 +203,9 @@ ohos_source_set("libarkfile_frontend_set_static") { } else { external_deps += [ "zlib:libz" ] } + if (enable_hilog) { + public_external_deps += [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" diff --git a/libpandafile/tests/BUILD.gn b/libpandafile/tests/BUILD.gn index f3d4e6ce0dd27c121efe95b5de4a4242d06aeb98..1882789b67aab3d824546ebfa4e9da2f0105b8a4 100644 --- a/libpandafile/tests/BUILD.gn +++ b/libpandafile/tests/BUILD.gn @@ -48,6 +48,10 @@ host_unittest_action("LibPandaFileTest") { sdk_libc_secshared_dep, ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + cflags = [ "-DWITH_MOCK" ] } diff --git a/libziparchive/BUILD.gn b/libziparchive/BUILD.gn index 89a06e1aca91a766b76b713b0fe20f8a68f9b987..31678435b8c90473423debe1d373e179745f318d 100644 --- a/libziparchive/BUILD.gn +++ b/libziparchive/BUILD.gn @@ -78,6 +78,9 @@ ohos_source_set("libarkziparchive_frontend_set_static") { sdk_libc_secshared_dep, ] + if (enable_hilog) { + public_external_deps = [ "hilog:libhilog" ] + } part_name = "runtime_core" subsystem_name = "arkcompiler" } diff --git a/libziparchive/tests/BUILD.gn b/libziparchive/tests/BUILD.gn index b5de56f91c19a85fc2ef63eb6e24dc267cd88fea..44e78caae5a76119a8e88c60111673a7236e02cd 100644 --- a/libziparchive/tests/BUILD.gn +++ b/libziparchive/tests/BUILD.gn @@ -37,6 +37,9 @@ host_unittest_action("LibZipArchiveTest") { "zlib:libz", sdk_libc_secshared_dep, ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } } group("unittest") { diff --git a/panda/BUILD.gn b/panda/BUILD.gn index 4c3c9e289934cc877daad526ba7a361d9e52b100..9cc539cd52bc075526255bd5b5d3af3f1d29e6b2 100644 --- a/panda/BUILD.gn +++ b/panda/BUILD.gn @@ -34,6 +34,9 @@ ohos_executable("ark_bin") { "$ark_root/libpandafile:libarkfile", "$ark_root/runtime:libarkruntime", ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } deps += [ "//arkcompiler/ets_runtime:libark_jsruntime" ] configs += [ "//arkcompiler/ets_runtime:ark_jsruntime_public_config" ] diff --git a/platforms/tests/BUILD.gn b/platforms/tests/BUILD.gn index 37aaf96e95a614893b0aeef37f95bae497eaf6fb..e7ec8e521a09cd068f86b022942fcce456fc73c1 100644 --- a/platforms/tests/BUILD.gn +++ b/platforms/tests/BUILD.gn @@ -37,6 +37,10 @@ host_unittest_action("PlatformsTest") { external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } + cflags = [ "-DWITH_MOCK" ] } diff --git a/plugins/ecmascript/tests/BUILD.gn b/plugins/ecmascript/tests/BUILD.gn index 2313d3d60578be3a0b44516b771354e99dc586fd..209858f59e41f1019fabdf3cb09ff9d59bfaf5b4 100644 --- a/plugins/ecmascript/tests/BUILD.gn +++ b/plugins/ecmascript/tests/BUILD.gn @@ -32,6 +32,9 @@ host_unittest_action("PluginsTest") { ] external_deps = [ sdk_libc_secshared_dep ] + if (enable_hilog) { + external_deps += [ "hilog:libhilog" ] + } } group("unittest") {