• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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/ark_config.gni")
15import("//build/ohos.gni")
16
17config("arkaot_public_config") {
18  include_dirs = [
19    "$target_gen_dir/generated",
20    "$ark_root/compiler/aot",
21    "$ark_root/compiler",
22    get_label_info(
23        "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
24        "target_gen_dir"),
25  ]
26}
27
28ark_gen_file("arkcompiler_options_h") {
29  template_file = "$ark_root/templates/options/options.h.erb"
30  data_file = "paoc.yaml"
31  requires = [ "$ark_root/templates/common.rb" ]
32  output_file = "$target_gen_dir/generated/paoc_options.h"
33}
34
35ohos_executable("ark_aot") {
36  sources = [ "paoc.cpp" ]
37
38  configs = [
39    ":arkaot_public_config",
40    "$ark_root:ark_config",
41    "$ark_root/runtime:arkruntime_public_config",
42    "$ark_root/libpandabase:arkbase_public_config",
43    "$ark_root/libpandafile:arkfile_public_config",
44    "$ark_root/compiler:arkcompiler_public_config",
45    "$ark_root/compiler/aot/aot_builder:aotbuilder_public_config",
46    "$ark_root/compiler/optimizer/code_generator:arkencoder_config",
47    sdk_libc_secshared_config,
48  ]
49
50  deps = [
51    ":arkcompiler_options_h",
52    "$ark_root/compiler:libarkcompiler",
53    "$ark_root/compiler/aot:libarkaotmanager",
54    "$ark_root/compiler/aot/aot_builder:aotbuilder",
55    "$ark_root/compiler/optimizer/code_generator:libarkencoder",
56    "$ark_root/cross_values:cross_values_getters_generate(${default_toolchain})",
57    "$ark_root/libpandabase:libarkbase",
58    "$ark_root/libpandafile:libarkfile",
59    "$ark_root/runtime:libarkruntime",
60  ]
61
62  install_enable = true
63  subsystem_name = "ark_aot"
64}
65