Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions fml/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ source_set("fml") {
"platform/win/paths_win.cc",
"platform/win/wstring_conversion.h",
]

if (is_win) {
# For wstring_conversion. See issue #50053.
defines = [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
}
} else {
sources += [
"platform/posix/file_posix.cc",
Expand Down
5 changes: 5 additions & 0 deletions shell/platform/common/cpp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ source_set("common_cpp") {
# won't have a JSON dependency.
defines = [ "USE_RAPID_JSON" ]
deps += [ "//third_party/rapidjson" ]

if (is_win) {
# For wstring_conversion. See issue #50053.
defines += [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
}
}

copy("publish_headers") {
Expand Down
10 changes: 10 additions & 0 deletions third_party/txt/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ config("txt_config") {
include_dirs = [ "src" ]
}

config("allow_posix_names") {
if (is_win && is_clang) {
# POSIX names of many functions are marked deprecated by default;
# disable that since they are used for cross-platform compatibility.
defines = [ "_CRT_NONSTDC_NO_DEPRECATE" ]
}
}

source_set("txt") {
defines = []
if (flutter_use_fontconfig) {
Expand Down Expand Up @@ -296,6 +304,8 @@ executable("txt_unittests") {
]
}

configs += [ ":allow_posix_names" ]

deps = [
":txt",
":txt_test_utils",
Expand Down