diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-29 20:36:55 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-10-29 20:36:55 +0000 |
| commit | d006c9368d655ad461636ccda9375f71cb3b01b0 (patch) | |
| tree | 3728e09c686e623db81f08067952e98c09db287c | |
| parent | 406d446e78c27f5d21cfaa4e9e4d645330376c01 (diff) | |
| download | bcm5719-llvm-d006c9368d655ad461636ccda9375f71cb3b01b0.tar.gz bcm5719-llvm-d006c9368d655ad461636ccda9375f71cb3b01b0.zip | |
Sanitizer: define WIN32_LEAN_AND_MEAN
Define WIN32_LEAN_AND_MEAN before including Windows.h. This is already being
done in some places. This does it more broadly. This permits building ASAN on
Linux for Winndows, as well as reduces the amount of included declarations.
llvm-svn: 251649
4 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_win.cc b/compiler-rt/lib/asan/asan_win.cc index f5a467a29d4..28ec0768078 100644 --- a/compiler-rt/lib/asan/asan_win.cc +++ b/compiler-rt/lib/asan/asan_win.cc @@ -14,6 +14,7 @@ #include "sanitizer_common/sanitizer_platform.h" #if SANITIZER_WINDOWS +#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <stdlib.h> diff --git a/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc b/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc index d59f9f5768a..d5a14088dac 100644 --- a/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc +++ b/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc @@ -24,6 +24,7 @@ // Using #ifdef rather than relying on Makefiles etc. // simplifies the build procedure. #ifdef ASAN_DYNAMIC_RUNTIME_THUNK +#define WIN32_LEAN_AND_MEAN #include <windows.h> // First, declare CRT sections we'll be using in this file diff --git a/compiler-rt/lib/interception/interception_win.cc b/compiler-rt/lib/interception/interception_win.cc index e3197ddc1a5..4c04c83b982 100644 --- a/compiler-rt/lib/interception/interception_win.cc +++ b/compiler-rt/lib/interception/interception_win.cc @@ -15,6 +15,7 @@ #ifdef _WIN32 #include "interception.h" +#define WIN32_LEAN_AND_MEAN #include <windows.h> namespace __interception { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc index b6aa6ca3749..b1dceebf45c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc @@ -14,6 +14,7 @@ #include "sanitizer_platform.h" #if SANITIZER_WINDOWS +#define WIN32_LEAN_AND_MEAN #include <windows.h> #include <dbghelp.h> #pragma comment(lib, "dbghelp.lib") |

