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") 15 16config("asmdefines_public_config") { 17 include_dirs = [ "$target_gen_dir/generated/" ] 18} 19 20ohos_static_library("asm_defines") { 21 sources = [ "defines.cpp" ] 22 configs = [ 23 "$ark_root:ark_config", 24 "$ark_root/runtime:arkruntime_public_config", 25 "$ark_root/libpandabase:arkbase_public_config", 26 sdk_libc_secshared_config, 27 "$ark_root/libpandafile:arkfile_public_config", 28 ] 29 cflags_cc = [ 30 "-Wno-invalid-offsetof", 31 "-S", 32 ] 33 output_dir = "$target_gen_dir/generated" 34 output_extension = "S" 35 output_name = "libasm_defines" 36 deps = [ 37 "$ark_root/libpandafile:arkfile_header_deps", 38 "$ark_root/runtime:arkruntime_header_deps", 39 sdk_libc_secshared_dep, 40 ] 41 42 part_name = "runtime_core" 43 subsystem_name = "arkcompiler" 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