summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-29 20:36:55 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-29 20:36:55 +0000
commitd006c9368d655ad461636ccda9375f71cb3b01b0 (patch)
tree3728e09c686e623db81f08067952e98c09db287c
parent406d446e78c27f5d21cfaa4e9e4d645330376c01 (diff)
downloadbcm5719-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
-rw-r--r--compiler-rt/lib/asan/asan_win.cc1
-rw-r--r--compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc1
-rw-r--r--compiler-rt/lib/interception/interception_win.cc1
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc1
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")
OpenPOWER on IntegriCloud