Merge "Use prebuilt llvm-rs-cc for unbundled build"

This commit is contained in:
Treehugger Robot
2018-11-19 07:51:24 +00:00
committed by Gerrit Code Review

View File

@@ -16,13 +16,22 @@ package cc
import ( import (
"android/soong/android" "android/soong/android"
"path/filepath"
"runtime"
"strings" "strings"
"github.com/google/blueprint" "github.com/google/blueprint"
) )
func init() { func init() {
pctx.HostBinToolVariable("rsCmd", "llvm-rs-cc") pctx.VariableFunc("rsCmd", func(ctx android.PackageVarContext) string {
if ctx.Config().UnbundledBuild() {
// Use RenderScript prebuilts for unbundled builds but not PDK builds
return filepath.Join("prebuilts/sdk/tools", runtime.GOOS, "bin/llvm-rs-cc")
} else {
return pctx.HostBinToolPath(ctx, "llvm-rs-cc").String()
}
})
} }
var rsCppCmdLine = strings.Replace(` var rsCppCmdLine = strings.Replace(`