Skip to content

Commit 3ceb837

Browse files
committed
[compiler-rt] Add CMake flag for AArch64 Linux with 39-bit VA.
Sanitizers currently assume AArch64 Linux has 48-bit VA. Followup patches will add checks for this flag to asan and hwasan.
1 parent 7e9db96 commit 3ceb837

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler-rt/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ option(SANITIZER_USE_STATIC_TEST_CXX
290290
"Use static libc++ for tests." ${DEFAULT_SANITIZER_USE_STATIC_TEST_CXX})
291291
pythonize_bool(SANITIZER_USE_STATIC_TEST_CXX)
292292

293+
option(SANITIZER_AARCH64_39BIT_VA
294+
"Configure sanitizer allocator for 39-bit VA kernel." OFF)
295+
293296
set(COMPILER_RT_SUPPORTED_CXX_LIBRARIES none default libcxx)
294297
set(COMPILER_RT_CXX_LIBRARY "default" CACHE STRING "Specify C++ library to use. Supported values are ${COMPILER_RT_SUPPORTED_CXX_LIBRARIES}.")
295298
if (NOT "${COMPILER_RT_CXX_LIBRARY}" IN_LIST COMPILER_RT_SUPPORTED_CXX_LIBRARIES)
@@ -843,6 +846,10 @@ if (SANITIZER_DISABLE_SYMBOLIZER_PATH_SEARCH)
843846
add_compile_definitions(SANITIZER_DISABLE_SYMBOLIZER_PATH_SEARCH)
844847
endif()
845848

849+
if (SANITIZER_AARCH64_39BIT_VA)
850+
add_compile_definitions(SANITIZER_AARCH64_39BIT_VA)
851+
endif()
852+
846853
add_subdirectory(lib)
847854

848855
if(COMPILER_RT_INCLUDE_TESTS)

0 commit comments

Comments
 (0)