Skip to content

Commit 4611206

Browse files
authored
Allow non-System32 DLL Loads for Sanitizer Builds (#4886)
1 parent 257a038 commit 4611206

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

+7-2
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,13 @@ if (WIN32)
229229
endif()
230230
endif()
231231

232-
# Configure linker to only load from the system directory.
233-
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x800")
232+
if (QUIC_ENABLE_SANITIZERS)
233+
message(STATUS "Allowing non-system32 DLLs to be loaded for ASAN")
234+
else()
235+
# Configure linker to only load from the system directory.
236+
message(STATUS "Configuring linker to only load from the system directory")
237+
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEPENDENTLOADFLAG:0x800")
238+
endif()
234239

235240
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
236241
list(APPEND QUIC_COMMON_FLAGS /MP)

0 commit comments

Comments
 (0)