[compiler-rt] a34f377 - [sanitizer_common] Fix build breakage by guarding #include <dlfcn.h>
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 13:00:41 PST 2023
Author: Thurston Dang
Date: 2023-11-09T21:00:33Z
New Revision: a34f3772e85f163fc851e300a4a9171b2a29f6bb
URL: https://github.com/llvm/llvm-project/commit/a34f3772e85f163fc851e300a4a9171b2a29f6bb
DIFF: https://github.com/llvm/llvm-project/commit/a34f3772e85f163fc851e300a4a9171b2a29f6bb.diff
LOG: [sanitizer_common] Fix build breakage by guarding #include <dlfcn.h>
My change
(https://github.com/llvm/llvm-project/commit/0be4c6b9483594494051e8f1f67afc2b516270ca) broke the Windows buildbot
(https://lab.llvm.org/buildbot/#/builders/127/builds/57976/steps/4/logs/stdio)
This fixes forward by adding a guard
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_dl.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_dl.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_dl.cpp
index 65194c07b41530a..e957d529c2fe1f5 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_dl.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_dl.cpp
@@ -13,10 +13,12 @@
#include "sanitizer_dl.h"
-#include <dlfcn.h>
-
#include "sanitizer_common/sanitizer_platform.h"
+#if SANITIZER_GLIBC
+# include <dlfcn.h>
+#endif
+
namespace __sanitizer {
extern const char *SanitizerToolName;
More information about the llvm-commits
mailing list