| Index: build/config/sanitizers/BUILD.gn
|
| diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
|
| index e7425461d40b6cdf5aab428f0adf66ba934dde13..2e9faf960c969f77cd15818915dbe38040d3e32c 100644
|
| --- a/build/config/sanitizers/BUILD.gn
|
| +++ b/build/config/sanitizers/BUILD.gn
|
| @@ -305,6 +305,30 @@ config("common_sanitizer_flags") {
|
| }
|
| }
|
|
|
| +config("sanitizer_default_libs") {
|
| + # The clang sanitizers (compiler-rt/ASAN) runtime requires functions from the
|
| + # CRT. This config must be added to targets that are removing the default
|
| + # libraries using the linker options "/NOENTRY", "/ENTRY" or "/NODEFAULTLIB".
|
| +
|
| + if (is_asan && is_win) {
|
| + assert(!is_debug, "win/asan does not support linking with debug CRT")
|
| +
|
| + if (is_component_build) {
|
| + libs = [
|
| + "msvcrt.lib",
|
| + "ucrt.lib",
|
| + "vcruntime.lib",
|
| + ]
|
| + } else {
|
| + libs = [
|
| + "libcmt.lib",
|
| + "libucrt.lib",
|
| + "libvcruntime.lib",
|
| + ]
|
| + }
|
| + }
|
| +}
|
| +
|
| config("asan_flags") {
|
| cflags = []
|
| if (is_asan) {
|
|
|