1# Copyright (c) 2021-2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15if ((defined(ark_standalone_build) && ark_standalone_build) || 16 (defined(ark_static_standalone_build) && ark_static_standalone_build)) { 17 import("//arkcompiler/runtime_core/static_core/ark_config.gni") 18} else { 19 import( 20 "//build/config/components/runtime_core/static_core/ark_common_config.gni") 21} 22 23ohos_executable("declgen_ets2ts") { 24 sources = [ 25 "declgenEts2Ts.cpp", 26 "main.cpp", 27 ] 28 29 include_dirs = [ "$target_gen_dir" ] 30 if ((defined(ark_standalone_build) && ark_standalone_build) || 31 (defined(ark_static_standalone_build) && ark_static_standalone_build)) { 32 configs = [ "$ark_root:ark_config" ] 33 } else { 34 configs = [ 35 "//build/config/components/runtime_core/static_core:ark_common_config", 36 ] 37 } 38 configs += [ 39 "$ark_es2panda_root:libes2panda_public_config", 40 "$ark_root/assembler:arkassembler_public_config", 41 "$ark_root/libpandafile:arkfile_public_config", 42 "$ark_root/libpandabase:arkbase_public_config", 43 "$ark_root/bytecode_optimizer:bytecodeopt_public_config", 44 "$ark_root/compiler:arkcompiler_public_config", 45 "$ark_root/runtime:arkruntime_public_config", 46 ] 47 48 deps = [ 49 "$ark_es2panda_root:libes2panda_frontend_static", 50 "$ark_es2panda_root:libes2panda_public_frontend_static", 51 ] 52 external_deps = [ 53 "runtime_core:libarktsassembler_package", 54 "runtime_core:libarktsbase_package", 55 "runtime_core:libarktsbytecodeopt_package", 56 "runtime_core:libarktscompiler_package", 57 "runtime_core:libarktsfile_package", 58 ] 59 60 libs = platform_libs 61 ldflags = platform_ldflags 62 if (is_linux) { 63 libs += [ "stdc++fs" ] 64 } 65 66 install_enable = true 67 part_name = "ets_frontend" 68 subsystem_name = "arkcompiler" 69} 70