Merge "Export more config variables" into qt-dev
diff --git a/android/config.go b/android/config.go
index 84dd66f..b938cb0 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1048,3 +1048,7 @@
func (c *config) ProductHiddenAPIStubsTest() []string {
return c.productVariables.ProductHiddenAPIStubsTest
}
+
+func (c *deviceConfig) TargetFSConfigGen() *string {
+ return c.config.productVariables.TargetFSConfigGen
+}
diff --git a/android/defs.go b/android/defs.go
index cd8b4e3..4890c66 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -20,7 +20,7 @@
)
var (
- pctx = NewPackageContext("android/soong/common")
+ pctx = NewPackageContext("android/soong/android")
cpPreserveSymlinks = pctx.VariableConfigMethod("cpPreserveSymlinks",
Config.CpPreserveSymlinksFlags)
diff --git a/android/variable.go b/android/variable.go
index 21af31f..c514ce7 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -285,6 +285,8 @@
ProductHiddenAPIStubs []string `json:",omitempty"`
ProductHiddenAPIStubsSystem []string `json:",omitempty"`
ProductHiddenAPIStubsTest []string `json:",omitempty"`
+
+ TargetFSConfigGen *string `json:",omitempty"`
}
func boolPtr(v bool) *bool {
diff --git a/apex/apex.go b/apex/apex.go
index 665e363..004de86 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -119,7 +119,7 @@
)
func init() {
- pctx.Import("android/soong/common")
+ pctx.Import("android/soong/android")
pctx.Import("android/soong/java")
pctx.HostBinToolVariable("apexer", "apexer")
// ART minimal builds (using the master-art manifest) do not have the "frameworks/base"
diff --git a/cc/config/global.go b/cc/config/global.go
index 372ffc4..07ef9d0 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -83,6 +83,7 @@
"-Wl,--warn-shared-textrel",
"-Wl,--fatal-warnings",
"-Wl,--no-undefined-version",
+ "-Wl,--exclude-libs,libgcc.a",
}
deviceGlobalLldflags = append(ClangFilterUnknownLldflags(deviceGlobalLdflags),
diff --git a/cc/ndk_sysroot.go b/cc/ndk_sysroot.go
index 9265bff..e39bae5 100644
--- a/cc/ndk_sysroot.go
+++ b/cc/ndk_sysroot.go
@@ -63,7 +63,7 @@
android.RegisterModuleType("preprocessed_ndk_headers", preprocessedNdkHeadersFactory)
android.RegisterSingletonType("ndk", NdkSingleton)
- pctx.Import("android/soong/common")
+ pctx.Import("android/soong/android")
}
func getNdkInstallBase(ctx android.PathContext) android.OutputPath {
diff --git a/cc/stl.go b/cc/stl.go
index e59f677..1a5dd79 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -245,7 +245,10 @@
ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include")
flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String())
case "ndk_libc++_shared", "ndk_libc++_static":
- // Nothing.
+ if ctx.Arch().ArchType == android.Arm {
+ // Make sure the _Unwind_XXX symbols are not re-exported.
+ flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs,libunwind.a")
+ }
case "":
// None or error.
if !ctx.toolchain().Bionic() {
diff --git a/cmd/soong_env/soong_env.go b/cmd/soong_env/soong_env.go
index 933e525..d305d83 100644
--- a/cmd/soong_env/soong_env.go
+++ b/cmd/soong_env/soong_env.go
@@ -15,7 +15,7 @@
// soong_glob is the command line tool that checks if the list of files matching a glob has
// changed, and only updates the output file list if it has changed. It is used to optimize
// out build.ninja regenerations when non-matching files are added. See
-// android/soong/common/glob.go for a longer description.
+// android/soong/android/glob.go for a longer description.
package main
import (
diff --git a/java/app_builder.go b/java/app_builder.go
index e5ccbbc..5bacb67 100644
--- a/java/app_builder.go
+++ b/java/app_builder.go
@@ -84,8 +84,10 @@
})
var certificateArgs []string
+ var deps android.Paths
for _, c := range certificates {
certificateArgs = append(certificateArgs, c.Pem.String(), c.Key.String())
+ deps = append(deps, c.Pem, c.Key)
}
ctx.Build(pctx, android.BuildParams{
@@ -93,6 +95,7 @@
Description: "signapk",
Output: outputFile,
Input: unsignedApk,
+ Implicits: deps,
Args: map[string]string{
"certificates": strings.Join(certificateArgs, " "),
},
diff --git a/java/builder.go b/java/builder.go
index 3da8348..338cd52 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -142,7 +142,7 @@
)
func init() {
- pctx.Import("android/soong/common")
+ pctx.Import("android/soong/android")
pctx.Import("android/soong/java/config")
}
diff --git a/python/builder.go b/python/builder.go
index e3b490c..36baecd 100644
--- a/python/builder.go
+++ b/python/builder.go
@@ -73,7 +73,7 @@
func init() {
pctx.Import("github.com/google/blueprint/bootstrap")
- pctx.Import("android/soong/common")
+ pctx.Import("android/soong/android")
pctx.HostBinToolVariable("parCmd", "soong_zip")
pctx.HostBinToolVariable("mergeParCmd", "merge_zips")
diff --git a/python/proto.go b/python/proto.go
index b3ffaa6..85ed1a5 100644
--- a/python/proto.go
+++ b/python/proto.go
@@ -35,12 +35,12 @@
// into a srcszip.
zipCmd := rule.Command().
Tool(ctx.Config().HostToolPath(ctx, "soong_zip")).
- FlagWithOutput("-o ", srcsZipFile).
- FlagWithArg("-C ", outDir.String()).
- FlagWithArg("-D ", outDir.String())
+ FlagWithOutput("-o ", srcsZipFile)
if pkgPath != "" {
zipCmd.FlagWithArg("-P ", pkgPath)
}
+ zipCmd.FlagWithArg("-C ", outDir.String()).
+ FlagWithArg("-D ", outDir.String())
rule.Command().Text("rm -rf").Flag(outDir.String())