[Win32] Don't warn on certain deprecated stdlib fns (#564)
Disable warnings about use of open, close, read, strdup, and some other
deprecated functions that will almost certainly never be removed, that
are found in third_party libraries.
Issue: https://github.com/flutter/flutter/issues/59199
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 8282fb4..8b723d9 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -269,6 +269,12 @@
assert(false, "unknown current_cpu " + current_cpu)
}
}
+
+ # Don't warn about open, close, read, and other deprecated stdlib functions.
+ defines += [
+ "_CRT_NONSTDC_NO_WARNINGS",
+ "_CRT_NONSTDC_NO_DEPRECATE",
+ ]
}
if (operator_new_alignment != "default" && is_clang) {