File tree 2 files changed +13
-0
lines changed
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)
37
37
add_compile_options (/Zc:__cplusplus)
38
38
endif ()
39
39
endif ()
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)
6
6
option (GENZH_BUILD_INTERNAL "Build code with the \" Internal\" configuration." OFF )
7
7
option (GENZH_BUILD_PROFILE "Build code with the \" Profile\" configuration." OFF )
8
8
option (GENZH_BUILD_DEBUG "Build code with the \" Debug\" configuration." OFF )
9
+ option (GENZH_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF )
9
10
10
11
if (NOT GENZH_BUILD_ZEROHOUR AND NOT GENZH_BUILD_GENERALS)
11
12
set (GENZH_BUILD_ZEROHOUR TRUE )
@@ -17,6 +18,7 @@ add_feature_info(GeneralsStuff GENZH_BUILD_GENERALS "Build Generals code")
17
18
add_feature_info(InternalBuild GENZH_BUILD_INTERNAL "Building as an \" Internal\" build" )
18
19
add_feature_info(ProfileBuild GENZH_BUILD_PROFILE "Building as a \" Profile\" build" )
19
20
add_feature_info(DebugBuild GENZH_BUILD_DEBUG "Building as a \" Debug\" build" )
21
+ add_feature_info(AddressSanitizer GENZH_BUILD_OPTION_ASAN "Building with address sanitizer" )
20
22
21
23
22
24
### GAME MEMORY OPTIONS ###
You can’t perform that action at this time.
0 commit comments