• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//ark/runtime_core/ark_config.gni")
15import("//build/ohos.gni")
16
17config("asmdefines_public_config") {
18  include_dirs = [ "$target_gen_dir/generated/" ]
19}
20
21ohos_static_library("asm_defines") {
22  sources = [ "defines.cpp" ]
23  configs = [
24    "$ark_root:ark_config",
25    "$ark_root/runtime:arkruntime_public_config",
26    "$ark_root/libpandabase:arkbase_public_config",
27    sdk_libc_secshared_config,
28    "$ark_root/libpandafile:arkfile_public_config",
29  ]
30  cflags_cc = [
31    "-Wno-invalid-offsetof",
32    "-S",
33  ]
34  output_dir = "$target_gen_dir/generated"
35  output_extension = "S"
36  output_name = "libasm_defines"
37  deps = [
38    "$ark_root/libpandafile:libarkfile",
39    "$ark_root/runtime:arkruntime_gen_intrinsics_intrinsics_gen_h",
40    "$ark_root/runtime:arkruntime_gen_intrinsics_intrinsics_h",
41    "$ark_root/runtime:arkruntime_gen_intrinsics_unimplemented_intrinsics-inl_cpp",
42    sdk_libc_secshared_dep,
43  ]
44}
45
46action("asm_defines_generator") {
47  script = "$ark_root/runtime/asm_defines/defines_generator.rb"
48  outputs = [ "$target_gen_dir/generated/asm_defines.h" ]
49  args = [
50    rebase_path("$target_gen_dir/generated/libasm_defines.S", root_build_dir),
51    rebase_path(outputs[0]),
52  ]
53  deps = [ ":asm_defines" ]
54}
55