From 8c2b1bd5bd85667a2ea24ec3aa85cbdd97f9ea1c Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 17 Jul 2022 23:09:00 -0700 Subject: Changeset: 85 Work on codegen (a big blob of changes about various things, giving up on writing a clear commit message) - stuff along the lines of cleaning up store process - remove completed TODOs - move code generation out of parser loop - ^^^ also introduce some weird bugs of DeclXxx::name field disappearing -- maybe fixed, maybe didn't, can't reliably reproduce - add infra to mangle (not included in codegen yet, also not tested) - convert SourceFile storage map to node map, ensuring pointer stability (was broken before) - buildsystem asan and UBsan applying to all targest --- CMakeLists.txt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 530bf8e..247de78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,14 +273,28 @@ endif() option(BRUSSEL_ENABLE_ASAN "Enable AddressSanitizer or not." OFF) if(BRUSSEL_ENABLE_ASAN) - target_compile_options(30-game - PRIVATE + # Shared to all downstream targets + target_compile_options(10-common + INTERFACE -fsanitize=address -fno-omit-frame-pointer ) - target_link_options(30-game - PRIVATE + target_link_options(10-common + INTERFACE -fsanitize=address -fno-omit-frame-pointer ) endif() + +option(BRUSSEL_ENABLE_UBSAN "Enable UndefinedBehaviorSanitizer or not." OFF) +if(BRUSSEL_ENABLE_UBSAN) + # Shared to all downstream targets + target_compile_options(10-common + INTERFACE + -fsanitize=undefined + ) + target_link_options(10-common + INTERFACE + -fsanitize=undefined + ) +endif() -- cgit v1.2.3-70-g09d2