Start using blueprint_go_binary

And install the tools into a more obvious location. soong_env is not
moved, since we need it to exist early, so that we can use it in
soong.bash in case there's a build failure.

Change-Id: I9bd1fa320d84d180b2cf3deb90782d380666f7a6
This commit is contained in:
Dan Willemsen 2016-05-26 15:13:03 -07:00
parent 17f052647f
commit c2aa4a9c52
4 changed files with 9 additions and 5 deletions

View file

@ -44,7 +44,7 @@ bootstrap_go_package {
} }
bootstrap_go_binary { blueprint_go_binary {
name: "soong_glob", name: "soong_glob",
deps: [ deps: [
"soong-glob", "soong-glob",
@ -166,7 +166,7 @@ bootstrap_go_package {
pluginFor: ["soong_build"], pluginFor: ["soong_build"],
} }
bootstrap_go_binary { blueprint_go_binary {
name: "soong_jar", name: "soong_jar",
srcs: [ srcs: [
"cmd/soong_jar/soong_jar.go", "cmd/soong_jar/soong_jar.go",
@ -199,7 +199,7 @@ bootstrap_go_package {
// androidmk Android.mk to Blueprints translator // androidmk Android.mk to Blueprints translator
// //
bootstrap_go_binary { blueprint_go_binary {
name: "androidmk", name: "androidmk",
srcs: [ srcs: [
"androidmk/cmd/androidmk/android.go", "androidmk/cmd/androidmk/android.go",

View file

@ -197,6 +197,10 @@ func (c *config) RemoveAbandonedFiles() bool {
return false return false
} }
func (c *config) BlueprintToolLocation() string {
return filepath.Join(c.buildDir, "host", c.PrebuiltOS(), "bin")
}
// PrebuiltOS returns the name of the host OS used in prebuilts directories // PrebuiltOS returns the name of the host OS used in prebuilts directories
func (c *config) PrebuiltOS() string { func (c *config) PrebuiltOS() string {
switch runtime.GOOS { switch runtime.GOOS {

View file

@ -39,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.ToolDir}", "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

View file

@ -90,7 +90,7 @@ func init() {
pctx.Import("github.com/google/blueprint/bootstrap") 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.ToolDir}", "soong_jar"))
pctx.HostBinToolVariable("dxCmd", "dx") pctx.HostBinToolVariable("dxCmd", "dx")
pctx.HostJavaToolVariable("jarjarCmd", "jarjar.jar") pctx.HostJavaToolVariable("jarjarCmd", "jarjar.jar")
} }