[PATCH] D123908: Add LLVM_SYS_PAGE_SIZE option to support 4K/8K/16K/64K page size system
Xiaodong Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 05:45:02 PDT 2022
XiaodongLoong updated this revision to Diff 423288.
XiaodongLoong added a comment.
Delete blank line
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123908/new/
https://reviews.llvm.org/D123908
Files:
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -557,6 +557,21 @@
option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF)
endif()
+set(LLVM_SYS_PAGE_SIZE "4K" CACHE STRING
+ "Define the system page size used to update ring buffer in HWasan.")
+if( LLVM_SYS_PAGE_SIZE STREQUAL "4K")
+ add_definitions(-DSYS_PAGE_SIZE_4K)
+endif()
+if( LLVM_SYS_PAGE_SIZE STREQUAL "8K")
+ add_definitions(-DSYS_PAGE_SIZE_8K)
+endif()
+if( LLVM_SYS_PAGE_SIZE STREQUAL "16K")
+ add_definitions(-DSYS_PAGE_SIZE_16K)
+endif()
+if( LLVM_SYS_PAGE_SIZE STREQUAL "64K")
+ add_definitions(-DSYS_PAGE_SIZE_64K)
+endif()
+
# Define the default arguments to use with 'lit', and an option for the user to
# override.
set(LIT_ARGS_DEFAULT "-sv")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123908.423288.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220417/87388080/attachment.bin>
More information about the llvm-commits
mailing list