Use the blueprint plugin infrastructure
Instead of using this hardcoded list, use the blueprint plugin infrastructure to find them at build time and load them. Bug: 23567252 Change-Id: Iae87e8c9bf020f4beb42c418b9a6bf8b0fe8b601
This commit is contained in:
parent
485e572aeb
commit
98b26c576a
3 changed files with 14 additions and 20 deletions
|
@ -16,12 +16,8 @@ bootstrap_go_binary {
|
||||||
"blueprint",
|
"blueprint",
|
||||||
"blueprint-bootstrap",
|
"blueprint-bootstrap",
|
||||||
"soong",
|
"soong",
|
||||||
"soong-art",
|
|
||||||
"soong-cc",
|
|
||||||
"soong-common",
|
"soong-common",
|
||||||
"soong-env",
|
"soong-env",
|
||||||
"soong-genrule",
|
|
||||||
"soong-java",
|
|
||||||
],
|
],
|
||||||
srcs: [
|
srcs: [
|
||||||
"cmd/soong_build/main.go",
|
"cmd/soong_build/main.go",
|
||||||
|
@ -133,6 +129,7 @@ bootstrap_go_package {
|
||||||
testSrcs: [
|
testSrcs: [
|
||||||
"cc/cc_test.go",
|
"cc/cc_test.go",
|
||||||
],
|
],
|
||||||
|
pluginFor: ["soong_build"],
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap_go_package {
|
bootstrap_go_package {
|
||||||
|
@ -147,6 +144,7 @@ bootstrap_go_package {
|
||||||
srcs: [
|
srcs: [
|
||||||
"genrule/genrule.go",
|
"genrule/genrule.go",
|
||||||
],
|
],
|
||||||
|
pluginFor: ["soong_build"],
|
||||||
}
|
}
|
||||||
|
|
||||||
bootstrap_go_binary {
|
bootstrap_go_binary {
|
||||||
|
@ -174,6 +172,7 @@ bootstrap_go_package {
|
||||||
"java/java.go",
|
"java/java.go",
|
||||||
"java/resources.go",
|
"java/resources.go",
|
||||||
],
|
],
|
||||||
|
pluginFor: ["soong_build"],
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -64,7 +64,7 @@ rule g.bootstrap.test
|
||||||
# Module: blueprint
|
# Module: blueprint
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:1:1
|
# Defined: build/blueprint/Blueprints:1:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -154,7 +154,7 @@ default $
|
||||||
# Module: blueprint-bootstrap
|
# Module: blueprint-bootstrap
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:70:1
|
# Defined: build/blueprint/Blueprints:70:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -182,7 +182,7 @@ default $
|
||||||
# Module: blueprint-bootstrap-bpdoc
|
# Module: blueprint-bootstrap-bpdoc
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:89:1
|
# Defined: build/blueprint/Blueprints:89:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -203,7 +203,7 @@ default $
|
||||||
# Module: blueprint-deptools
|
# Module: blueprint-deptools
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:46:1
|
# Defined: build/blueprint/Blueprints:46:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -219,7 +219,7 @@ default $
|
||||||
# Module: blueprint-parser
|
# Module: blueprint-parser
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:31:1
|
# Defined: build/blueprint/Blueprints:31:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -284,7 +284,7 @@ default $
|
||||||
# Module: blueprint-pathtools
|
# Module: blueprint-pathtools
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:52:1
|
# Defined: build/blueprint/Blueprints:52:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -344,7 +344,7 @@ default $
|
||||||
# Module: blueprint-proptools
|
# Module: blueprint-proptools
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_go_package
|
# Type: bootstrap_go_package
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·002
|
# Factory: github.com/google/blueprint/bootstrap.func·003
|
||||||
# Defined: build/blueprint/Blueprints:64:1
|
# Defined: build/blueprint/Blueprints:64:1
|
||||||
|
|
||||||
build $
|
build $
|
||||||
|
@ -360,7 +360,7 @@ default $
|
||||||
# Module: choosestage
|
# Module: choosestage
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_core_go_binary
|
# Type: bootstrap_core_go_binary
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·003
|
# Factory: github.com/google/blueprint/bootstrap.func·005
|
||||||
# Defined: build/blueprint/Blueprints:127:1
|
# Defined: build/blueprint/Blueprints:127:1
|
||||||
|
|
||||||
build ${g.bootstrap.buildDir}/.bootstrap/choosestage/obj/choosestage.a: $
|
build ${g.bootstrap.buildDir}/.bootstrap/choosestage/obj/choosestage.a: $
|
||||||
|
@ -383,7 +383,7 @@ default ${g.bootstrap.BinDir}/choosestage
|
||||||
# Module: gotestmain
|
# Module: gotestmain
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_core_go_binary
|
# Type: bootstrap_core_go_binary
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·003
|
# Factory: github.com/google/blueprint/bootstrap.func·005
|
||||||
# Defined: build/blueprint/Blueprints:122:1
|
# Defined: build/blueprint/Blueprints:122:1
|
||||||
|
|
||||||
build ${g.bootstrap.buildDir}/.bootstrap/gotestmain/obj/gotestmain.a: $
|
build ${g.bootstrap.buildDir}/.bootstrap/gotestmain/obj/gotestmain.a: $
|
||||||
|
@ -406,7 +406,7 @@ default ${g.bootstrap.BinDir}/gotestmain
|
||||||
# Module: minibp
|
# Module: minibp
|
||||||
# Variant:
|
# Variant:
|
||||||
# Type: bootstrap_core_go_binary
|
# Type: bootstrap_core_go_binary
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·003
|
# Factory: github.com/google/blueprint/bootstrap.func·005
|
||||||
# Defined: build/blueprint/Blueprints:101:1
|
# Defined: build/blueprint/Blueprints:101:1
|
||||||
|
|
||||||
build ${g.bootstrap.buildDir}/.bootstrap/minibp/obj/minibp.a: $
|
build ${g.bootstrap.buildDir}/.bootstrap/minibp/obj/minibp.a: $
|
||||||
|
@ -436,7 +436,7 @@ default ${g.bootstrap.BinDir}/minibp
|
||||||
|
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
# Singleton: bootstrap
|
# Singleton: bootstrap
|
||||||
# Factory: github.com/google/blueprint/bootstrap.func·008
|
# Factory: github.com/google/blueprint/bootstrap.func·012
|
||||||
|
|
||||||
rule s.bootstrap.primarybp
|
rule s.bootstrap.primarybp
|
||||||
command = ${g.bootstrap.BinDir}/minibp --build-primary ${runTests} -m ${g.bootstrap.bootstrapManifest} --timestamp ${timestamp} --timestampdep ${timestampdep} -b ${g.bootstrap.buildDir} -d ${outfile}.d -o ${outfile} ${in}
|
command = ${g.bootstrap.BinDir}/minibp --build-primary ${runTests} -m ${g.bootstrap.bootstrapManifest} --timestamp ${timestamp} --timestampdep ${timestampdep} -b ${g.bootstrap.buildDir} -d ${outfile}.d -o ${outfile} ${in}
|
||||||
|
|
|
@ -24,12 +24,7 @@ import (
|
||||||
|
|
||||||
"android/soong"
|
"android/soong"
|
||||||
|
|
||||||
// These imports cause the modules to register their ModuleTypes, etc. with the soong package
|
|
||||||
_ "android/soong/art"
|
|
||||||
_ "android/soong/cc"
|
|
||||||
"android/soong/common"
|
"android/soong/common"
|
||||||
_ "android/soong/genrule"
|
|
||||||
_ "android/soong/java"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in a new issue