Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a998446d authored by Florian Mayer's avatar Florian Mayer
Browse files

[hwasan] Also pass use-after-scope flag in LTO

Change-Id: I3df3d3047fd5aaa93e6c4b68885d39e20b12ccdb
parent 226354ab
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -38,11 +38,11 @@ var (
	}
	asanLdflags = []string{"-Wl,-u,__asan_preinit"}

	// DO NOT ADD MLLVM FLAGS HERE! ADD THEM BELOW TO hwasanCommonFlags.
	hwasanCflags = []string{
		"-fno-omit-frame-pointer",
		"-Wno-frame-larger-than=",
		"-fsanitize-hwaddress-abi=platform",
		"-mllvm", "-hwasan-use-after-scope=1",
	}

	// ThinLTO performs codegen during link time, thus these flags need to
@@ -60,6 +60,7 @@ var (
		// GlobalISel is the default at -O0 on aarch64.
		"--aarch64-enable-global-isel-at-O=-1",
		"-fast-isel=false",
		"-hwasan-use-after-scope=1",
	}

	cfiBlocklistPath     = "external/compiler-rt/lib/cfi"