@@ -1354,6 +1354,7 @@ pub const cache_helpers = struct {
13541354 hh .add (mod .red_zone );
13551355 hh .add (mod .sanitize_c );
13561356 hh .add (mod .sanitize_thread );
1357+ hh .add (mod .sanitize_address );
13571358 hh .add (mod .fuzz );
13581359 hh .add (mod .unwind_tables );
13591360 hh .add (mod .structured_cfg );
@@ -1790,6 +1791,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
17901791 const any_unwind_tables = options .config .any_unwind_tables or options .root_mod .unwind_tables != .none ;
17911792 const any_non_single_threaded = options .config .any_non_single_threaded or ! options .root_mod .single_threaded ;
17921793 const any_sanitize_thread = options .config .any_sanitize_thread or options .root_mod .sanitize_thread ;
1794+ const any_sanitize_address = options .config .any_sanitize_address or options .root_mod .sanitize_address ;
17931795 const any_sanitize_c : std.zig.SanitizeC = switch (options .config .any_sanitize_c ) {
17941796 .off = > options .root_mod .sanitize_c ,
17951797 .trap = > if (options .root_mod .sanitize_c == .full )
@@ -1920,6 +1922,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
19201922 cache .hash .add (options .config .any_unwind_tables );
19211923 cache .hash .add (options .config .any_non_single_threaded );
19221924 cache .hash .add (options .config .any_sanitize_thread );
1925+ cache .hash .add (options .config .any_sanitize_address );
19231926 cache .hash .add (options .config .any_sanitize_c );
19241927 cache .hash .add (options .config .any_fuzz );
19251928 cache .hash .add (options .function_sections );
@@ -2075,6 +2078,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
20752078 comp .config .any_unwind_tables = any_unwind_tables ;
20762079 comp .config .any_non_single_threaded = any_non_single_threaded ;
20772080 comp .config .any_sanitize_thread = any_sanitize_thread ;
2081+ comp .config .any_sanitize_address = any_sanitize_address ;
20782082 comp .config .any_sanitize_c = any_sanitize_c ;
20792083 comp .config .any_fuzz = any_fuzz ;
20802084
@@ -7415,6 +7419,7 @@ pub fn build_crt_file(
74157419 .stack_protector = 0 ,
74167420 .sanitize_c = .off ,
74177421 .sanitize_thread = false ,
7422+ .sanitize_address = false ,
74187423 .red_zone = comp .root_mod .red_zone ,
74197424 // Some libcs (e.g. musl) are opinionated about -fomit-frame-pointer.
74207425 .omit_frame_pointer = options .omit_frame_pointer orelse comp .root_mod .omit_frame_pointer ,
0 commit comments