1# Copyright (c) 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/ark_config.gni") 15import("//arkcompiler/runtime_core/libabckit/tests/canary/abckit_canary.gni") 16 17config("abckit_canary_c_config") { 18 cflags = [ 19 "-std=c99", 20 "-pedantic", 21 "-pedantic-errors", 22 "-Wall", 23 "-Wextra", 24 "-Werror", 25 ] 26} 27 28ohos_executable("abckit_canary_c") { 29 configs = [ ":abckit_canary_c_config" ] 30 sources = [ "canary.c" ] 31 32 # NOTE: Important! Do not add `include_dirs` to this target! 33 # Compiling this test without `include_dirs` ensures all relative paths are correct 34 # and there are no dependencies from `include` to `src` 35 install_enable = false 36 part_name = "runtime_core" 37 subsystem_name = "arkcompiler" 38} 39 40abckit_standalone_canary("abckit_canary_c_metadata_core") { 41 configs = [ ":abckit_canary_c_config" ] 42 input_file = "$abckit_root/include/c/metadata_core.h" 43 extension = "c" 44} 45 46abckit_standalone_canary("abckit_canary_c_ir_core") { 47 configs = [ ":abckit_canary_c_config" ] 48 input_file = "$abckit_root/include/c/ir_core.h" 49 extension = "c" 50} 51 52abckit_standalone_canary("abckit_canary_c_extensions_js_metadata_js") { 53 configs = [ ":abckit_canary_c_config" ] 54 input_file = "$abckit_root/include/c/extensions/js/metadata_js.h" 55 extension = "c" 56} 57 58abckit_standalone_canary("abckit_canary_c_extensions_arkts_metadata_arkts") { 59 configs = [ ":abckit_canary_c_config" ] 60 input_file = "$abckit_root/include/c/extensions/arkts/metadata_arkts.h" 61 extension = "c" 62} 63 64abckit_standalone_canary("abckit_canary_c_abckit") { 65 configs = [ ":abckit_canary_c_config" ] 66 input_file = "$abckit_root/include/c/abckit.h" 67 extension = "c" 68} 69 70abckit_standalone_canary("abckit_canary_c_api_version") { 71 configs = [ ":abckit_canary_c_config" ] 72 input_file = "$abckit_root/include/c/api_version.h" 73 extension = "c" 74} 75 76abckit_standalone_canary("abckit_canary_c_statuses") { 77 configs = [ ":abckit_canary_c_config" ] 78 input_file = "$abckit_root/include/c/statuses.h" 79 extension = "c" 80} 81 82abckit_standalone_canary("abckit_canary_c_isa_isa_dynamic") { 83 configs = [ ":abckit_canary_c_config" ] 84 input_file = "$abckit_root/include/c/isa/isa_dynamic.h" 85 extension = "c" 86} 87 88group("abckit_canary_c_standalone") { 89 deps = [ 90 ":abckit_canary_c_abckit", 91 ":abckit_canary_c_api_version", 92 ":abckit_canary_c_extensions_arkts_metadata_arkts", 93 ":abckit_canary_c_extensions_js_metadata_js", 94 ":abckit_canary_c_ir_core", 95 ":abckit_canary_c_isa_isa_dynamic", 96 ":abckit_canary_c_metadata_core", 97 ":abckit_canary_c_statuses", 98 ] 99} 100