summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Gallop <russell.gallop@sony.com>2020-09-10 16:23:33 +0100
committerRussell Gallop <russell.gallop@sony.com>2021-01-21 16:55:29 +0000
commit5a131e012d74ff3a31fb2b660d901efa29f0d3c9 (patch)
tree1a1c876e48fd776a43c2c1671dea8c1cafbc3d44
parent9b01f6fca53a00dbd468f78322ef4094f3f9ea52 (diff)
downloadllvm-5a131e012d74ff3a31fb2b660d901efa29f0d3c9.tar.gz
Fix INTERFACE on Windows, based on SANITIZER_INTERFACE_ATTRIBUTE.
-rw-r--r--compiler-rt/lib/scudo/standalone/internal_defs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler-rt/lib/scudo/standalone/internal_defs.h b/compiler-rt/lib/scudo/standalone/internal_defs.h
index 16e764a1a6f4..4e3f8e217910 100644
--- a/compiler-rt/lib/scudo/standalone/internal_defs.h
+++ b/compiler-rt/lib/scudo/standalone/internal_defs.h
@@ -27,9 +27,18 @@
#define CONCATENATE(S, C) CONCATENATE_(S, C)
// Attributes & builtins related macros.
-
+#if SCUDO_WINDOWS
+#if SCUDO_IMPORT_INTERFACE
+#define INTERFACE __declspec(dllimport)
+#else
+#define INTERFACE __declspec(dllexport)
+#endif
+#else
#define INTERFACE __attribute__((visibility("default")))
+#endif
+
#define HIDDEN __attribute__((visibility("hidden")))
+
#if SCUDO_WINDOWS
#define WEAK
#else