1# Copyright 2019 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16 17import("$dir_pw_build/target_types.gni") 18 19pw_executable("single_write_snprintf") { 20 sources = [ "format_single.cc" ] 21 deps = [ 22 "$dir_pw_bloat:bloat_this_binary", 23 "..", 24 ] 25 defines = [ "USE_FORMAT=0" ] 26} 27 28pw_executable("single_write_format") { 29 sources = [ "format_single.cc" ] 30 deps = [ 31 "$dir_pw_bloat:bloat_this_binary", 32 "..", 33 ] 34 defines = [ "USE_FORMAT=1" ] 35} 36 37pw_executable("multiple_writes_snprintf") { 38 sources = [ "format_multiple.cc" ] 39 deps = [ 40 "$dir_pw_bloat:bloat_this_binary", 41 "..", 42 ] 43 defines = [ "USE_FORMAT=0" ] 44} 45 46pw_executable("multiple_writes_format") { 47 sources = [ "format_multiple.cc" ] 48 deps = [ 49 "$dir_pw_bloat:bloat_this_binary", 50 "..", 51 ] 52 defines = [ "USE_FORMAT=1" ] 53} 54 55pw_executable("many_writes_snprintf") { 56 sources = [ "format_many_without_error_handling.cc" ] 57 deps = [ 58 "$dir_pw_bloat:bloat_this_binary", 59 "..", 60 ] 61 defines = [ "USE_FORMAT=0" ] 62} 63 64pw_executable("many_writes_format") { 65 sources = [ "format_many_without_error_handling.cc" ] 66 deps = [ 67 "$dir_pw_bloat:bloat_this_binary", 68 "..", 69 ] 70 defines = [ "USE_FORMAT=1" ] 71} 72 73pw_executable("build_string_with_snprintf_no_base_snprintf") { 74 sources = [ "string_builder_size_report.cc" ] 75 deps = [ 76 "$dir_pw_bloat:bloat_this_binary", 77 "..", 78 ] 79 defines = [ 80 "USE_STRING_BUILDER=0", 81 "PROVIDE_BASE_SNPRINTF=0", 82 ] 83} 84 85pw_executable("build_string_with_string_builder_no_base_snprintf") { 86 sources = [ "string_builder_size_report.cc" ] 87 deps = [ 88 "$dir_pw_bloat:bloat_this_binary", 89 "..", 90 ] 91 defines = [ 92 "USE_STRING_BUILDER=1", 93 "PROVIDE_BASE_SNPRINTF=0", 94 ] 95} 96 97pw_executable("build_string_with_snprintf") { 98 sources = [ "string_builder_size_report.cc" ] 99 deps = [ 100 "$dir_pw_bloat:bloat_this_binary", 101 "..", 102 ] 103 defines = [ 104 "USE_STRING_BUILDER=0", 105 "PROVIDE_BASE_SNPRINTF=1", 106 ] 107} 108 109pw_executable("build_string_with_string_builder") { 110 sources = [ "string_builder_size_report.cc" ] 111 deps = [ 112 "$dir_pw_bloat:bloat_this_binary", 113 "..", 114 ] 115 defines = [ 116 "USE_STRING_BUILDER=1", 117 "PROVIDE_BASE_SNPRINTF=1", 118 ] 119} 120 121pw_executable("build_string_incremental_with_snprintf") { 122 sources = [ "string_builder_size_report_incremental.cc" ] 123 deps = [ 124 "$dir_pw_bloat:bloat_this_binary", 125 "..", 126 ] 127 defines = [ "USE_STRING_BUILDER=0" ] 128} 129 130pw_executable("build_string_incremental_with_string_builder") { 131 sources = [ "string_builder_size_report_incremental.cc" ] 132 deps = [ 133 "$dir_pw_bloat:bloat_this_binary", 134 "..", 135 ] 136 defines = [ "USE_STRING_BUILDER=1" ] 137} 138