1 # Copyright 2019 The Pigweed Authors
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
7 # https://www.apache.org/licenses/LICENSE-2.0
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
15 import("//build_overrides/pigweed.gni")
17 import("$dir_pw_build/target_types.gni")
19 pw_executable("single_write_snprintf") {
20 sources = [ "format_single.cc" ]
22 "$dir_pw_bloat:bloat_this_binary",
25 defines = [ "USE_FORMAT=0" ]
28 pw_executable("single_write_format") {
29 sources = [ "format_single.cc" ]
31 "$dir_pw_bloat:bloat_this_binary",
34 defines = [ "USE_FORMAT=1" ]
37 pw_executable("multiple_writes_snprintf") {
38 sources = [ "format_multiple.cc" ]
40 "$dir_pw_bloat:bloat_this_binary",
43 defines = [ "USE_FORMAT=0" ]
46 pw_executable("multiple_writes_format") {
47 sources = [ "format_multiple.cc" ]
49 "$dir_pw_bloat:bloat_this_binary",
52 defines = [ "USE_FORMAT=1" ]
55 pw_executable("many_writes_snprintf") {
56 sources = [ "format_many_without_error_handling.cc" ]
58 "$dir_pw_bloat:bloat_this_binary",
61 defines = [ "USE_FORMAT=0" ]
64 pw_executable("many_writes_format") {
65 sources = [ "format_many_without_error_handling.cc" ]
67 "$dir_pw_bloat:bloat_this_binary",
70 defines = [ "USE_FORMAT=1" ]
73 pw_executable("build_string_with_snprintf_no_base_snprintf") {
74 sources = [ "string_builder_size_report.cc" ]
76 "$dir_pw_bloat:bloat_this_binary",
80 "USE_STRING_BUILDER=0",
81 "PROVIDE_BASE_SNPRINTF=0",
85 pw_executable("build_string_with_string_builder_no_base_snprintf") {
86 sources = [ "string_builder_size_report.cc" ]
88 "$dir_pw_bloat:bloat_this_binary",
92 "USE_STRING_BUILDER=1",
93 "PROVIDE_BASE_SNPRINTF=0",
97 pw_executable("build_string_with_snprintf") {
98 sources = [ "string_builder_size_report.cc" ]
100 "$dir_pw_bloat:bloat_this_binary",
104 "USE_STRING_BUILDER=0",
105 "PROVIDE_BASE_SNPRINTF=1",
109 pw_executable("build_string_with_string_builder") {
110 sources = [ "string_builder_size_report.cc" ]
112 "$dir_pw_bloat:bloat_this_binary",
116 "USE_STRING_BUILDER=1",
117 "PROVIDE_BASE_SNPRINTF=1",
121 pw_executable("build_string_incremental_with_snprintf") {
122 sources = [ "string_builder_size_report_incremental.cc" ]
124 "$dir_pw_bloat:bloat_this_binary",
127 defines = [ "USE_STRING_BUILDER=0" ]
130 pw_executable("build_string_incremental_with_string_builder") {
131 sources = [ "string_builder_size_report_incremental.cc" ]
133 "$dir_pw_bloat:bloat_this_binary",
136 defines = [ "USE_STRING_BUILDER=1" ]