Chromium Code Reviews| Index: build/config/sanitizers/BUILD.gn |
| diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn |
| index 36d45c1d1b6f1edf77020d965aec0f298c3fa702..ef644f64596414ea349332c84fa0ee0aa6270927 100644 |
| --- a/build/config/sanitizers/BUILD.gn |
| +++ b/build/config/sanitizers/BUILD.gn |
| @@ -296,6 +296,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 |
| + # librairies using the linker options "/NOENTRY", "/ENTRY" or "/NODEFAULTLIB". |
|
Dirk Pranke
2016/12/18 04:20:49
s/librairies/libraries/
etienneb
2017/01/11 16:05:32
Done.
|
| + |
| + 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) { |