Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create conditional compilation flag for stack maps #1088

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmake/KLLVMCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ include_directories(${PROJECT_SOURCE_DIR}/include)
# Auto-generated header path
set(KLLVM_AUTOGEN_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
include_directories(${KLLVM_AUTOGEN_INCLUDE_DIR})

option(K_LLVM_STACK_MAPS "Enable stack-map-based GC for the LLVM backend" OFF)
if (K_LLVM_STACK_MAPS)
set(K_LLVM_STACK_MAPS_FLAG "1")
else()
set(K_LLVM_STACK_MAPS_FLAG "0")
endif()
2 changes: 2 additions & 0 deletions config/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@
#define BACKEND_TARGET_DATALAYOUT TOSTRING(@BACKEND_TARGET_DATALAYOUT@)
#define BACKEND_TARGET_TRIPLE TOSTRING(@BACKEND_TARGET_TRIPLE@)

#define K_LLVM_STACK_MAPS @K_LLVM_STACK_MAPS_FLAG@

#endif
Loading