File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -37,3 +37,14 @@ if (NOT IS_VS6_BUILD)
3737 add_compile_options (/Zc:__cplusplus)
3838 endif ()
3939endif ()
40+
41+ if (GENZH_BUILD_OPTION_ASAN)
42+ if (MSVC )
43+ set (ENV{ASAN_OPTIONS} "shadow_scale=2" )
44+ add_compile_options (/fsanitize=address)
45+ add_link_options (/fsanitize=address)
46+ else ()
47+ add_compile_options (-fsanitize=address)
48+ add_link_options (-fsanitize=address)
49+ endif ()
50+ endif ()
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ option(GENZH_BUILD_GENERALS "Build Generals code." ON)
66option (GENZH_BUILD_INTERNAL "Build code with the \" Internal\" configuration." OFF )
77option (GENZH_BUILD_PROFILE "Build code with the \" Profile\" configuration." OFF )
88option (GENZH_BUILD_DEBUG "Build code with the \" Debug\" configuration." OFF )
9+ option (GENZH_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF )
910
1011if (NOT GENZH_BUILD_ZEROHOUR AND NOT GENZH_BUILD_GENERALS)
1112 set (GENZH_BUILD_ZEROHOUR TRUE )
@@ -17,6 +18,7 @@ add_feature_info(GeneralsStuff GENZH_BUILD_GENERALS "Build Generals code")
1718add_feature_info(InternalBuild GENZH_BUILD_INTERNAL "Building as an \" Internal\" build" )
1819add_feature_info(ProfileBuild GENZH_BUILD_PROFILE "Building as a \" Profile\" build" )
1920add_feature_info(DebugBuild GENZH_BUILD_DEBUG "Building as a \" Debug\" build" )
21+ add_feature_info(AddressSanitizer GENZH_BUILD_OPTION_ASAN "Building with address sanitizer" )
2022
2123
2224### GAME MEMORY OPTIONS ###
You can’t perform that action at this time.
0 commit comments