aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-04-07 17:11:30 -0700
committerColin Cross <ccross@android.com>2015-04-08 15:19:24 -0700
commit1332b0035caf416d4d9b275e6bfead48fe0b9cac (patch)
tree588b0698a2d6288e383bf314aae5282f89bbb69c /cmd
parent8df14ac3f097ae09e536a58b9e8f7505dd2b5550 (diff)
downloadbuild_soong-1332b0035caf416d4d9b275e6bfead48fe0b9cac.tar.gz
build_soong-1332b0035caf416d4d9b275e6bfead48fe0b9cac.tar.bz2
build_soong-1332b0035caf416d4d9b275e6bfead48fe0b9cac.zip
Move config into common and provide helper
Using ctx.Config().(Config) everywhere is a mouthful, and it is inefficient to do the type assertion. Put the Config interface into the context, and provide an AConfig() to return the Config already converted to the right type. Change-Id: I301a1fd7d2a005580aabca7866a37c5d42ad8c69
Diffstat (limited to 'cmd')
-rw-r--r--cmd/soong_build/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go
index 01740d1c..a1a4ce05 100644
--- a/cmd/soong_build/main.go
+++ b/cmd/soong_build/main.go
@@ -26,7 +26,6 @@ import (
"android/soong/art"
"android/soong/cc"
"android/soong/common"
- "android/soong/config"
"android/soong/genrule"
"android/soong/java"
)
@@ -78,7 +77,7 @@ func main() {
ctx.RegisterSingletonType("checkbuild", common.CheckbuildSingleton)
ctx.RegisterSingletonType("env", common.EnvSingleton)
- configuration, err := config.New(srcDir)
+ configuration, err := common.NewConfig(srcDir)
if err != nil {
fmt.Fprintf(os.Stderr, "%s", err)
os.Exit(1)
@@ -87,5 +86,5 @@ func main() {
// Temporary hack
//ctx.SetIgnoreUnknownModuleTypes(true)
- bootstrap.Main(ctx, configuration, config.ConfigFileName)
+ bootstrap.Main(ctx, configuration, common.ConfigFileName)
}