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("//arkcompiler/runtime_core/static_core/ark_config.gni") 15import("//build/ohos.gni") 16 17ohos_executable("ets2panda") { 18 sources = [ "main.cpp" ] 19 20 include_dirs = [ 21 "$target_gen_dir", 22 "$target_gen_dir/include", 23 ] 24 25 configs = [ 26 "$ark_root:ark_config", 27 "$ark_root/assembler:arkassembler_public_config", 28 "$ark_es2panda_root:libes2panda_public_config", 29 "$ark_root/libpandafile:arkfile_public_config", 30 "$ark_root/libpandabase:arkbase_public_config", 31 "$ark_root/bytecode_optimizer:bytecodeopt_public_config", 32 "$ark_root/compiler:arkcompiler_public_config", 33 "$ark_root/runtime:arkruntime_public_config", 34 ] 35 36 deps = [ 37 "$ark_es2panda_root:libes2panda_frontend_static", 38 "$ark_es2panda_root:libes2panda_public_frontend_static", 39 ] 40 41 if (ark_standalone_build) { 42 deps += [ 43 "$ark_root/bytecode_optimizer:libarktsbytecodeopt_package", 44 "$ark_root/libpandabase:libarktsbase_package", 45 "$ark_root/libpandafile:libarktsfile_package", 46 ] 47 } 48 49 external_deps = [ 50 "runtime_core:libarktsassembler_package", 51 "runtime_core:libarktsbase_package", 52 "runtime_core:libarktsbytecodeopt_package", 53 "runtime_core:libarktscompiler_package", 54 "runtime_core:libarktsfile_package", 55 sdk_libc_secshared_dep, 56 ] 57 58 libs = platform_libs 59 ldflags = platform_ldflags 60 if (is_linux) { 61 libs += [ "stdc++fs" ] 62 } 63 64 output_name = "es2panda" 65 install_enable = true 66 part_name = "ets_frontend" 67 subsystem_name = "arkcompiler" 68} 69