Merge changes Icfd32d0a,Icc9ff4d4,Ieee07502,I559eeb1f,Iaf2a6f6d, ...
* changes:
Use java language 1.9 for sdk_version: "current"
Remove special case for sdk_version: "none"
Use system modules for turbine
Make javaVersion an enum
Move TestConfig sdk versions forward
Split java 8 and 9 classpaths in TestClasspath
diff --git a/androidmk/androidmk/android.go b/androidmk/androidmk/android.go
index be52879..0082d8b 100644
--- a/androidmk/androidmk/android.go
+++ b/androidmk/androidmk/android.go
@@ -198,6 +198,7 @@
"LOCAL_EXPORT_PACKAGE_RESOURCES": "export_package_resources",
"LOCAL_PRIVILEGED_MODULE": "privileged",
"LOCAL_AAPT_INCLUDE_ALL_RESOURCES": "aapt_include_all_resources",
+ "LOCAL_DONT_MERGE_MANIFESTS": "dont_merge_manifests",
"LOCAL_USE_EMBEDDED_NATIVE_LIBS": "use_embedded_native_libs",
"LOCAL_USE_EMBEDDED_DEX": "use_embedded_dex",
diff --git a/apex/apex.go b/apex/apex.go
index 629cbbf..a421850 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1374,6 +1374,8 @@
copyCommands = append(copyCommands, "ln -s "+filepath.Base(dest)+" "+symlinkDest)
}
}
+ emitCommands = append(emitCommands, "sort -o "+imageContentFile.String()+" "+imageContentFile.String())
+
implicitInputs := append(android.Paths(nil), filesToCopy...)
implicitInputs = append(implicitInputs, a.manifestOut)
diff --git a/cc/androidmk.go b/cc/androidmk.go
index cdd8e92..f278d6f 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -317,6 +317,11 @@
filepath.Dir(fuzz.dictionary.String())+":"+fuzz.dictionary.Base())
}
+ if fuzz.config != nil {
+ fuzzFiles = append(fuzzFiles,
+ filepath.Dir(fuzz.config.String())+":config.json")
+ }
+
if len(fuzzFiles) > 0 {
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_TEST_DATA := "+strings.Join(fuzzFiles, " "))
diff --git a/cc/binary.go b/cc/binary.go
index 9f18d6c..b27142c 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -158,7 +158,7 @@
if binary.static() {
if ctx.selectedStl() == "libc++_static" {
- deps.StaticLibs = append(deps.StaticLibs, "libm", "libc", "libdl")
+ deps.StaticLibs = append(deps.StaticLibs, "libm", "libc")
}
// static libraries libcompiler_rt, libc and libc_nomalloc need to be linked with
// --start-group/--end-group along with libgcc. If they are in deps.StaticLibs,
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 8418ec7..635e7d0 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -2309,7 +2309,7 @@
variant := "android_arm64_armv8-a_core"
binModuleRule := ctx.ModuleForTests("static_test", variant).Rule("ld")
libFlags := binModuleRule.Args["libFlags"]
- systemStaticLibs := []string{"libc.a", "libm.a", "libdl.a"}
+ systemStaticLibs := []string{"libc.a", "libm.a"}
for _, lib := range systemStaticLibs {
if !strings.Contains(libFlags, lib) {
t.Errorf("Static lib %q was not found in %q", lib, libFlags)
diff --git a/cc/fuzz.go b/cc/fuzz.go
index a99b0bb..4d38526 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -15,6 +15,7 @@
package cc
import (
+ "encoding/json"
"path/filepath"
"strings"
@@ -24,12 +25,35 @@
"android/soong/cc/config"
)
+type FuzzConfig struct {
+ // Email address of people to CC on bugs or contact about this fuzz target.
+ Cc []string `json:"cc,omitempty"`
+ // Boolean specifying whether to disable the fuzz target from running
+ // automatically in continuous fuzzing infrastructure.
+ Disable *bool `json:"disable,omitempty"`
+ // Component in Google's bug tracking system that bugs should be filed to.
+ Componentid *int64 `json:"componentid,omitempty"`
+ // Hotlists in Google's bug tracking system that bugs should be marked with.
+ Hotlists []string `json:"hotlists,omitempty"`
+}
+
+func (f *FuzzConfig) String() string {
+ b, err := json.Marshal(f)
+ if err != nil {
+ panic(err)
+ }
+
+ return string(b)
+}
+
type FuzzProperties struct {
// Optional list of seed files to be installed to the fuzz target's output
// directory.
Corpus []string `android:"path"`
// Optional dictionary to be installed to the fuzz target's output directory.
Dictionary *string `android:"path"`
+ // Config for running the target on fuzzing infrastructure.
+ Fuzz_config *FuzzConfig
}
func init() {
@@ -57,6 +81,7 @@
dictionary android.Path
corpus android.Paths
corpusIntermediateDir android.Path
+ config android.Path
}
func (fuzz *fuzzBinary) linkerProps() []interface{} {
@@ -122,6 +147,19 @@
fuzz.dictionary.String())
}
}
+
+ if fuzz.Properties.Fuzz_config != nil {
+ configPath := android.PathForModuleOut(ctx, "config").Join(ctx, "config.txt")
+ ctx.Build(pctx, android.BuildParams{
+ Rule: android.WriteFile,
+ Description: "fuzzer infrastructure configuration",
+ Output: configPath,
+ Args: map[string]string{
+ "content": fuzz.Properties.Fuzz_config.String(),
+ },
+ })
+ fuzz.config = configPath
+ }
}
func NewFuzz(hod android.HostOrDeviceSupported) *Module {
@@ -234,6 +272,12 @@
archDirs[archDir] = append(archDirs[archDir],
fileToZip{fuzzModule.dictionary, ccModule.Name()})
}
+
+ // Additional fuzz config.
+ if fuzzModule.config != nil {
+ archDirs[archDir] = append(archDirs[archDir],
+ fileToZip{fuzzModule.config, ccModule.Name()})
+ }
})
for archDir, filesToZip := range archDirs {
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 5172fc8..3f0f0f4 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -848,12 +848,14 @@
// Determine the runtime library required
runtimeLibrary := ""
+ var extraStaticDeps []string
toolchain := c.toolchain(mctx)
if Bool(c.sanitize.Properties.Sanitize.Address) {
runtimeLibrary = config.AddressSanitizerRuntimeLibrary(toolchain)
} else if Bool(c.sanitize.Properties.Sanitize.Hwaddress) {
if c.staticBinary() {
runtimeLibrary = config.HWAddressSanitizerStaticLibrary(toolchain)
+ extraStaticDeps = []string{"libdl"}
} else {
runtimeLibrary = config.HWAddressSanitizerRuntimeLibrary(toolchain)
}
@@ -887,7 +889,7 @@
mctx.AddFarVariationDependencies(append(mctx.Target().Variations(), []blueprint.Variation{
{Mutator: "link", Variation: "static"},
{Mutator: "image", Variation: c.imageVariation()},
- }...), staticDepTag, runtimeLibrary)
+ }...), staticDepTag, append([]string{runtimeLibrary}, extraStaticDeps...)...)
} else if !c.static() && !c.header() {
// dynamic executable and shared libs get shared runtime libs
mctx.AddFarVariationDependencies(append(mctx.Target().Variations(), []blueprint.Variation{
diff --git a/cc/stl.go b/cc/stl.go
index aa34240..f9273e1 100644
--- a/cc/stl.go
+++ b/cc/stl.go
@@ -175,7 +175,7 @@
deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm")
}
if ctx.staticBinary() {
- deps.StaticLibs = append(deps.StaticLibs, "libm", "libc", "libdl")
+ deps.StaticLibs = append(deps.StaticLibs, "libm", "libc")
}
}
case "":
diff --git a/java/aar.go b/java/aar.go
index 2c19487..afe860c 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -72,6 +72,9 @@
// paths to additional manifest files to merge with main manifest.
Additional_manifests []string `android:"path"`
+
+ // do not include AndroidManifest from dependent libraries
+ Dont_merge_manifests *bool
}
type aapt struct {
@@ -225,7 +228,7 @@
a.transitiveManifestPaths = append(android.Paths{manifestPath}, additionalManifests...)
a.transitiveManifestPaths = append(a.transitiveManifestPaths, transitiveStaticLibManifests...)
- if len(a.transitiveManifestPaths) > 1 {
+ if len(a.transitiveManifestPaths) > 1 && !Bool(a.aaptProperties.Dont_merge_manifests) {
a.mergedManifestFile = manifestMerger(ctx, a.transitiveManifestPaths[0], a.transitiveManifestPaths[1:], a.isLibrary)
if !a.isLibrary {
// Only use the merged manifest for applications. For libraries, the transitive closure of manifests