2019-11-15 20:03:57 +00:00
|
|
|
# Copyright 2019 The Pigweed Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
|
|
# use this file except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations under
|
|
|
|
# the License.
|
|
|
|
|
2020-06-10 01:12:12 +00:00
|
|
|
# gn-format disable
|
|
|
|
import("//build_overrides/pigweed.gni")
|
2019-11-15 20:03:57 +00:00
|
|
|
|
2020-06-10 01:12:12 +00:00
|
|
|
import("$dir_pigweed/legacy_target.gni")
|
|
|
|
import("$dir_pw_build/target_types.gni")
|
2019-11-15 20:03:57 +00:00
|
|
|
pw_executable("single_write_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_single.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("single_write_format") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_single.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=1" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("multiple_writes_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_multiple.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("multiple_writes_format") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_multiple.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=1" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("many_writes_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_many_without_error_handling.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("many_writes_format") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "format_many_without_error_handling.cc" ]
|
2019-11-15 20:03:57 +00:00
|
|
|
deps = [
|
2019-11-20 01:10:20 +00:00
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
2019-11-15 20:03:57 +00:00
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [ "USE_FORMAT=1" ]
|
|
|
|
}
|
2019-11-20 01:10:20 +00:00
|
|
|
|
|
|
|
pw_executable("build_string_with_snprintf_no_base_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [
|
|
|
|
"USE_STRING_BUILDER=0",
|
|
|
|
"PROVIDE_BASE_SNPRINTF=0",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("build_string_with_string_builder_no_base_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [
|
|
|
|
"USE_STRING_BUILDER=1",
|
|
|
|
"PROVIDE_BASE_SNPRINTF=0",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("build_string_with_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [
|
|
|
|
"USE_STRING_BUILDER=0",
|
|
|
|
"PROVIDE_BASE_SNPRINTF=1",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("build_string_with_string_builder") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
|
|
|
defines = [
|
|
|
|
"USE_STRING_BUILDER=1",
|
|
|
|
"PROVIDE_BASE_SNPRINTF=1",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("build_string_incremental_with_snprintf") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report_incremental.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
2019-12-04 17:12:15 +00:00
|
|
|
defines = [ "USE_STRING_BUILDER=0" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pw_executable("build_string_incremental_with_string_builder") {
|
2020-02-27 19:43:49 +00:00
|
|
|
sources = [ "string_builder_size_report_incremental.cc" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
deps = [
|
|
|
|
"$dir_pw_bloat:bloat_this_binary",
|
|
|
|
"..",
|
|
|
|
]
|
2019-12-04 17:12:15 +00:00
|
|
|
defines = [ "USE_STRING_BUILDER=1" ]
|
2019-11-20 01:10:20 +00:00
|
|
|
}
|