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

Commit 7077be40 authored by Colin Cross's avatar Colin Cross
Browse files

Don't use sanitized kati when SANITIZE_HOST=address is set

There used to be CI builds that set SANITIZE_HOST=address, so we
took advantage of that to also run a sanitize version of kati and
ninja.  Those CI builds are no longer active.

Building host fuzzers requires setting SANITIZE_HOST=address, and
sanitized kati is too slow to use for developer builds.  Split out
a separate SANITIZE_BUILD_TOOL_PREBUILTS flag that can be set when
manual testing of sanitized host tool prebuilts is desired.

SANTIIZE_HOST=address will still affect any tools that are built
during the build.

Change-Id: Ifc85d50655aa05e5f0784370086c7203162c8158
Fixes: 278603593
Flag: EXEMPT host-only
Test: manual
parent e390c0e4
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1754,14 +1754,12 @@ func (c *configImpl) SisoBin() string {
}

func (c *configImpl) PrebuiltBuildTool(name string) string {
	if v, ok := c.environ.Get("SANITIZE_HOST"); ok {
		if sanitize := strings.Fields(v); inList("address", sanitize) {
	if c.environ.IsEnvTrue("SANITIZE_BUILD_TOOL_PREBUILTS") {
		asan := filepath.Join("prebuilts/build-tools", c.HostPrebuiltTag(), "asan/bin", name)
		if _, err := os.Stat(asan); err == nil {
			return asan
		}
	}
	}
	return filepath.Join("prebuilts/build-tools", c.HostPrebuiltTag(), "bin", name)
}