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
diff --git a/Blueprints b/Blueprints
index 945d2f4..84c9913 100644
--- a/Blueprints
+++ b/Blueprints
@@ -18,7 +18,6 @@
"soong-art",
"soong-cc",
"soong-common",
- "soong-config",
"soong-env",
"soong-genrule",
"soong-java",
@@ -81,6 +80,7 @@
srcs: [
"common/arch.go",
"common/checkbuild.go",
+ "common/config.go",
"common/defs.go",
"common/env.go",
"common/glob.go",
@@ -90,26 +90,12 @@
}
bootstrap_go_package {
- name: "soong-config",
- pkgPath: "android/soong/config",
- deps: [
- "blueprint",
- "blueprint-bootstrap",
- "soong-common",
- ],
- srcs: [
- "config/config.go",
- ],
-}
-
-bootstrap_go_package {
name: "soong-cc",
pkgPath: "android/soong/cc",
deps: [
"blueprint",
"blueprint-pathtools",
"soong-common",
- "soong-config",
"soong-genrule",
],
srcs: [
@@ -134,7 +120,6 @@
"blueprint",
"blueprint-pathtools",
"soong-common",
- "soong-config",
],
srcs: [
"genrule/genrule.go",
@@ -155,7 +140,6 @@
"blueprint",
"blueprint-pathtools",
"soong-common",
- "soong-config",
],
srcs: [
"java/builder.go",