am 24f2f8df
: Update to new blueprint api for bootstrap.BinDir
* commit '24f2f8df874c5253c0772f1524c85fedaa7c64be': Update to new blueprint api for bootstrap.BinDir
This commit is contained in:
902
build.ninja.in
902
build.ninja.in
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/bootstrap"
|
_ "github.com/google/blueprint/bootstrap"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -29,7 +29,7 @@ var (
|
|||||||
|
|
||||||
srcDir = pctx.VariableConfigMethod("srcDir", Config.SrcDir)
|
srcDir = pctx.VariableConfigMethod("srcDir", Config.SrcDir)
|
||||||
|
|
||||||
androidbpCmd = filepath.Join(bootstrap.BinDir, "androidbp")
|
androidbpCmd = filepath.Join("${bootstrap.BinDir}", "androidbp")
|
||||||
androidbp = pctx.StaticRule("androidbp",
|
androidbp = pctx.StaticRule("androidbp",
|
||||||
blueprint.RuleParams{
|
blueprint.RuleParams{
|
||||||
Command: androidbpCmd + " ${srcDir}/Android.bp $in $out",
|
Command: androidbpCmd + " ${srcDir}/Android.bp $in $out",
|
||||||
@@ -71,3 +71,7 @@ var (
|
|||||||
},
|
},
|
||||||
"fromPath")
|
"fromPath")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
pctx.Import("github.com/google/blueprint/bootstrap")
|
||||||
|
}
|
||||||
|
@@ -19,7 +19,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/bootstrap"
|
|
||||||
|
|
||||||
"android/soong/glob"
|
"android/soong/glob"
|
||||||
)
|
)
|
||||||
@@ -40,7 +39,7 @@ import (
|
|||||||
// in a build failure with a "missing and no known rule to make it" error.
|
// in a build failure with a "missing and no known rule to make it" error.
|
||||||
|
|
||||||
var (
|
var (
|
||||||
globCmd = filepath.Join(bootstrap.BinDir, "soong_glob")
|
globCmd = filepath.Join("${bootstrap.BinDir}", "soong_glob")
|
||||||
|
|
||||||
// globRule rule traverses directories to produce a list of files that match $glob
|
// globRule rule traverses directories to produce a list of files that match $glob
|
||||||
// and writes it to $out if it has changed, and writes the directories to $out.d
|
// and writes it to $out if it has changed, and writes the directories to $out.d
|
||||||
|
@@ -25,7 +25,7 @@ import (
|
|||||||
"android/soong/common"
|
"android/soong/common"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/bootstrap"
|
_ "github.com/google/blueprint/bootstrap"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -84,9 +84,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
pctx.Import("github.com/google/blueprint/bootstrap")
|
||||||
pctx.StaticVariable("commonJdkFlags", "-source 1.7 -target 1.7 -Xmaxerrs 9999999")
|
pctx.StaticVariable("commonJdkFlags", "-source 1.7 -target 1.7 -Xmaxerrs 9999999")
|
||||||
pctx.StaticVariable("javacCmd", "javac -J-Xmx1024M $commonJdkFlags")
|
pctx.StaticVariable("javacCmd", "javac -J-Xmx1024M $commonJdkFlags")
|
||||||
pctx.StaticVariable("jarCmd", filepath.Join(bootstrap.BinDir, "soong_jar"))
|
pctx.StaticVariable("jarCmd", filepath.Join("${bootstrap.BinDir}", "soong_jar"))
|
||||||
pctx.VariableFunc("dxCmd", func(c interface{}) (string, error) {
|
pctx.VariableFunc("dxCmd", func(c interface{}) (string, error) {
|
||||||
return c.(common.Config).HostBinTool("dx")
|
return c.(common.Config).HostBinTool("dx")
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user