diff --git a/arkguard/BUILD.gn b/arkguard/BUILD.gn index 9a76b306ea414eea8db028ca3d2f2ff5e6106915..66e5c5af551dc921e74843c7ebb7a4e2adf95826 100644 --- a/arkguard/BUILD.gn +++ b/arkguard/BUILD.gn @@ -13,6 +13,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +if ((defined(ark_standalone_build) && ark_standalone_build) || + (defined(ark_static_standalone_build) && ark_static_standalone_build)) { + import("//arkcompiler/runtime_core/static_core/ark_config.gni") +} else { + import( + "//build/config/components/runtime_core/static_core/ark_common_config.gni") +} + typescript_dir = get_label_info("//third_party/typescript:build_typescript", "target_out_dir") @@ -50,7 +58,7 @@ action("build_arkguard") { "src/utils/TypeUtils.ts", ] - deps = [ "//third_party/typescript:build_typescript" ] + external_deps = [ "typescript:build_typescript_etc" ] script = "compile_arkguard.py" args = [ rebase_path(get_path_info("./", "abspath")), @@ -60,3 +68,12 @@ action("build_arkguard") { outputs = [ "${target_out_dir}/arkguard-1.1.3.tgz" ] } + +if (!(defined(ark_static_standalone_build) && ark_static_standalone_build)) { + ohos_shared_headers("build_arkguard_etc") { + include_dirs = [] + deps = [ ":build_arkguard" ] + part_name = "ets_frontend" + subsystem_name = "arkcompiler" + } +} diff --git a/bundle.json b/bundle.json index 3ea4b67716580490c83ee24a95b068b98b2402fd..884e4a747cad1a8994818df5be8eb2a87e89d72b 100644 --- a/bundle.json +++ b/bundle.json @@ -30,7 +30,8 @@ }, "build": { "sub_component": [ - "//arkcompiler/ets_frontend:ets_frontend_build" + "//arkcompiler/ets_frontend:ets_frontend_build", + "//arkcompiler/ets_frontend/ets2panda:libes2panda_public(//build/toolchain/linux:clang_x64)" ], "inner_kits": [ { @@ -44,6 +45,12 @@ }, { "name": "//arkcompiler/ets_frontend/ets2panda:libes2panda_public" + }, + { + "name": "//arkcompiler/ets_frontend/ets2panda:libes2panda_public_headers" + }, + { + "name": "//arkcompiler/ets_frontend/arkguard:build_arkguard_etc" } ], "test": [ diff --git a/ets2panda/BUILD.gn b/ets2panda/BUILD.gn index 056ee80391bc85bc0f60d4201ce6f901c42404d4..1661dce2dcdbaca9f4856cbaecacd0ac42a30b19 100644 --- a/ets2panda/BUILD.gn +++ b/ets2panda/BUILD.gn @@ -32,7 +32,7 @@ config("libes2panda_public_config") { "$ark_es2panda_root", ] if (ark_standalone_build || ark_static_standalone_build) { - include_dirs += [ + include_dirs += [ "$target_gen_dir/generated", "//third_party/icu/icu4c/source/common", "//third_party/icu/icu4c/source/i18n", @@ -116,6 +116,7 @@ libes2panda_sources = [ "checker/types/ets/etsAnyType.cpp", "checker/types/ets/etsArrayType.cpp", "checker/types/ets/etsAsyncFuncReturnType.cpp", + "checker/types/ets/etsAwaitedType.cpp", "checker/types/ets/etsBigIntType.cpp", "checker/types/ets/etsBooleanType.cpp", "checker/types/ets/etsEnumType.cpp", @@ -127,7 +128,6 @@ libes2panda_sources = [ "checker/types/ets/etsObjectType.cpp", "checker/types/ets/etsPartialTypeParameter.cpp", "checker/types/ets/etsReadonlyType.cpp", - "checker/types/ets/etsAwaitedType.cpp", "checker/types/ets/etsResizableArrayType.cpp", "checker/types/ets/etsStringType.cpp", "checker/types/ets/etsTupleType.cpp", @@ -1266,6 +1266,22 @@ ohos_shared_library("libes2panda_public") { subsystem_name = "arkcompiler" } +if (!(defined(ark_static_standalone_build) && ark_static_standalone_build)) { + ohos_shared_headers("libes2panda_public_headers") { + include_dirs = [ "$ark_es2panda_root/public" ] + deps = [ + ":gen_${LIB_NAME}_decl_inc", + ":gen_${LIB_NAME}_enums_inc", + ":gen_${LIB_NAME}_idl", + ":gen_${LIB_NAME}_impl_inc", + ":gen_${LIB_NAME}_include_inc", + ":gen_${LIB_NAME}_list_inc", + ] + part_name = "ets_frontend" + subsystem_name = "arkcompiler" + } +} + action("generate_ets2panda_info") { script = "$ark_root/gn/build/es2panda_info.sh" outputs = [ "$target_gen_dir/generated/es2panda_build_info.h" ] @@ -1299,8 +1315,8 @@ ohos_source_set("libes2panda_public_frontend_static") { "$ark_root/assembler:libarktsassembler", "$ark_root/bytecode_optimizer:libarktsbytecodeopt_package", "$ark_root/compiler:libarktscompiler", - "$ark_root/libpandabase:libarktsbase", "$ark_root/libarkfile:libarktsfile", + "$ark_root/libpandabase:libarktsbase", ] } else { external_deps += [