diff --git a/BUILD.gn b/BUILD.gn index 5b3d19fa9ae57a535f5783eb94e26119907662d7..a12adf7eac1e181c3ddc8c61430e34a59f6eb496 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -31,7 +31,6 @@ config("ark_config") { "//arkcompiler/ets_frontend/*", ] - include_dirs = [ "$ark_root" ] defines = [ "PANDA_TARGET_MOBILE_WITH_MANAGED_LIBS=1" ] if (is_linux) { diff --git a/es2panda/BUILD.gn b/es2panda/BUILD.gn index c50e8e84349c527a03c9085bfa198826f64f003d..07fa89a69d4bfe98f9a7dd84f37f71149ff6368a 100644 --- a/es2panda/BUILD.gn +++ b/es2panda/BUILD.gn @@ -429,9 +429,17 @@ ohos_static_library("es2panda_lib") { "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", "//third_party/icu/icu4c/source", + "$ark_root/assembler", + "$ark_root/libpandabase", + "$ark_root/libpandabase/mem", ] } else { - external_deps += [ "icu:static_icuuc" ] + external_deps += [ + "icu:static_icuuc", + "runtime_core:arkassembler_public_headers", + "runtime_core:arkbase_public_headers", + "runtime_core:arkfile_public_headers", + ] } if (!is_arkui_x) { @@ -518,6 +526,20 @@ ohos_executable("es2panda") { "zlib:libz", sdk_libc_secshared_dep, ] + if (ark_standalone_build || (defined(is_arkui_x) && is_arkui_x)) { + include_dirs += [ + "$ark_root/assembler", + "$ark_root/libpandabase", + "$ark_root/libpandabase/mem", + ] + } else { + external_deps += [ + "icu:static_icuuc", + "runtime_core:arkassembler_public_headers", + "runtime_core:arkbase_public_headers", + "runtime_core:arkfile_public_headers", + ] + } if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { external_deps += [ diff --git a/merge_abc/BUILD.gn b/merge_abc/BUILD.gn index 27ebcc75c147f1eff55218b8080d9286d77afd3a..fcfdef0acf6978812e13960d8e86745cf18ff028 100644 --- a/merge_abc/BUILD.gn +++ b/merge_abc/BUILD.gn @@ -45,9 +45,6 @@ protobuf_snapshot_generator_sources = [ config("panda_assembly_proto_public_config") { include_dirs = [ - "$ark_root/assembler", - "$ark_root/libpandabase", - "$ark_root/libpandabase/mem", "$ark_root", "src", "$proto_out_dir", @@ -168,6 +165,7 @@ ohos_source_set("assembly_proto_static") { deps = [ ":arkcompiler_generate_proto" ] external_deps = [] + include_dirs = [] if (!is_arkui_x) { external_deps += [ "protobuf:protobuf_lite_static", @@ -196,6 +194,12 @@ ohos_source_set("assembly_proto_static") { if (enable_hilog) { external_deps += [ "hilog:libhilog" ] } + } else { + include_dirs += [ + "$ark_root/assembler", + "$ark_root/libpandabase", + "$ark_root/libpandabase/mem", + ] } if (defined(ohos_indep_compiler_enable) && ohos_indep_compiler_enable) { @@ -249,6 +253,11 @@ ohos_executable("merge_abc") { "$ark_root/libpandafile:arkfile_public_config", "$ark_root/libpandabase:arkbase_public_config", ] + include_dirs += [ + "$ark_root/assembler", + "$ark_root/libpandabase", + "$ark_root/libpandabase/mem", + ] } else { configs = [ "//arkcompiler/ets_frontend:ark_config" ] external_deps += [