Support ASAN for ckati and ninja
I missed this when converting to soong_ui. Test: m -j blueprint_tools (check soong.log) Test: SANITIZE_HOST=address m -j blueprint_tools Change-Id: I01eb567db6848dc36dd679557291a4e600a63bba
This commit is contained in:
@@ -318,3 +318,15 @@ func (c *configImpl) HostPrebuiltTag() string {
|
||||
panic("Unsupported OS")
|
||||
}
|
||||
}
|
||||
|
||||
func (c *configImpl) PrebuiltBuildTool(name string) string {
|
||||
if v, ok := c.environ.Get("SANITIZE_HOST"); ok {
|
||||
if sanitize := strings.Fields(v); inList("address", sanitize) {
|
||||
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)
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@ func runKati(ctx Context, config Config) {
|
||||
|
||||
genKatiSuffix(ctx, config)
|
||||
|
||||
executable := "prebuilts/build-tools/" + config.HostPrebuiltTag() + "/bin/ckati"
|
||||
executable := config.PrebuiltBuildTool("ckati")
|
||||
args := []string{
|
||||
"--ninja",
|
||||
"--ninja_dir=" + config.OutDir(),
|
||||
|
@@ -26,7 +26,7 @@ func runNinja(ctx Context, config Config) {
|
||||
ctx.BeginTrace("ninja")
|
||||
defer ctx.EndTrace()
|
||||
|
||||
executable := "prebuilts/build-tools/" + config.HostPrebuiltTag() + "/bin/ninja"
|
||||
executable := config.PrebuiltBuildTool("ninja")
|
||||
args := []string{
|
||||
"-d", "keepdepfile",
|
||||
}
|
||||
|
Reference in New Issue
Block a user