Dump deps for native and java to json files.
Abandon the use of SOONG_COLLECT_CC_DEPS and SOONG_COLLECT_JAVA_DEPS, soong can generate module_bp_cc_deps.json and module_bp_java_deps.json without passing any variables. BUG: 204397180 Test: rm out/soong/module_bp*json "m nothing" should see both json files were generated. Change-Id: If30ad5dbabb6709f834134cbc9a513a9bdc9d9de
This commit is contained in:
parent
9de51af72c
commit
c44ba2a6f9
2 changed files with 6 additions and 16 deletions
13
cc/ccdeps.go
13
cc/ccdeps.go
|
@ -44,11 +44,9 @@ type ccdepsGeneratorSingleton struct {
|
|||
var _ android.SingletonMakeVarsProvider = (*ccdepsGeneratorSingleton)(nil)
|
||||
|
||||
const (
|
||||
// Environment variables used to control the behavior of this singleton.
|
||||
envVariableCollectCCDeps = "SOONG_COLLECT_CC_DEPS"
|
||||
ccdepsJsonFileName = "module_bp_cc_deps.json"
|
||||
cClang = "clang"
|
||||
cppClang = "clang++"
|
||||
ccdepsJsonFileName = "module_bp_cc_deps.json"
|
||||
cClang = "clang"
|
||||
cppClang = "clang++"
|
||||
)
|
||||
|
||||
type ccIdeInfo struct {
|
||||
|
@ -83,10 +81,7 @@ type ccDeps struct {
|
|||
}
|
||||
|
||||
func (c *ccdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
if !ctx.Config().IsEnvTrue(envVariableCollectCCDeps) {
|
||||
return
|
||||
}
|
||||
|
||||
// (b/204397180) Generate module_bp_cc_deps.json by default.
|
||||
moduleDeps := ccDeps{}
|
||||
moduleInfos := map[string]ccIdeInfo{}
|
||||
|
||||
|
|
|
@ -40,16 +40,11 @@ type jdepsGeneratorSingleton struct {
|
|||
var _ android.SingletonMakeVarsProvider = (*jdepsGeneratorSingleton)(nil)
|
||||
|
||||
const (
|
||||
// Environment variables used to modify behavior of this singleton.
|
||||
envVariableCollectJavaDeps = "SOONG_COLLECT_JAVA_DEPS"
|
||||
jdepsJsonFileName = "module_bp_java_deps.json"
|
||||
jdepsJsonFileName = "module_bp_java_deps.json"
|
||||
)
|
||||
|
||||
func (j *jdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonContext) {
|
||||
if !ctx.Config().IsEnvTrue(envVariableCollectJavaDeps) {
|
||||
return
|
||||
}
|
||||
|
||||
// (b/204397180) Generate module_bp_java_deps.json by default.
|
||||
moduleInfos := make(map[string]android.IdeInfo)
|
||||
|
||||
ctx.VisitAllModules(func(module android.Module) {
|
||||
|
|
Loading…
Reference in a new issue