Merge "Allow Strip in Debuggable"
diff --git a/cc/builder.go b/cc/builder.go
index 8c8aa17..81c09b1 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -44,14 +44,14 @@
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
- Command: "${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
+ Command: "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
CommandDeps: []string{"$ccCmd"},
},
"ccCmd", "cFlags")
ccNoDeps = pctx.AndroidStaticRule("ccNoDeps",
blueprint.RuleParams{
- Command: "$ccCmd -c $cFlags -o $out $in",
+ Command: "$relPwd $ccCmd -c $cFlags -o $out $in",
CommandDeps: []string{"$ccCmd"},
},
"ccCmd", "cFlags")
@@ -220,7 +220,7 @@
Labels: map[string]string{"type": "abi-dump", "tool": "header-abi-dumper"},
ExecStrategy: "${config.REAbiDumperExecStrategy}",
Platform: map[string]string{
- remoteexec.PoolKey: "${config.RECXXPool}",
+ remoteexec.PoolKey: "${config.RECXXPool}",
},
}, []string{"cFlags", "exportDirs"}, nil)
diff --git a/cc/config/global.go b/cc/config/global.go
index 1aa2621..a170652 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -53,13 +53,6 @@
"-Werror=pragma-pack",
"-Werror=pragma-pack-suspicious-include",
"-Werror=unreachable-code-loop-increment",
-
- // -fdebug-compilation-dir=. is used to make both the action command line and the output
- // independent of the working directory of the action.
- // Using cc1 flags since RBE's input processor does not yet have the updated version
- // of LLVM that promotes the cc1 flag to driver level flag.
- // See: https://reviews.llvm.org/D63387
- "-Xclang,-fdebug-compilation-dir,.",
}
commonGlobalConlyflags = []string{}
@@ -157,6 +150,10 @@
var pctx = android.NewPackageContext("android/soong/cc/config")
func init() {
+ if android.BuildOs == android.Linux {
+ commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=")
+ }
+
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
diff --git a/java/dexpreopt_bootjars_test.go b/java/dexpreopt_bootjars_test.go
index 4a8d3cd..47110c9 100644
--- a/java/dexpreopt_bootjars_test.go
+++ b/java/dexpreopt_bootjars_test.go
@@ -87,7 +87,7 @@
ruleFile := "boot-foo.art"
expectedInputs := []string{
- "dex_artjars/android/apex/com.android.art/javalib/arm64/boot.art",
+ "dex_artjars/android/apex/art_boot_images/javalib/arm64/boot.art",
"dex_bootjars_input/foo.jar",
"dex_bootjars_input/bar.jar",
"dex_bootjars_input/baz.jar",
diff --git a/java/dexpreopt_config.go b/java/dexpreopt_config.go
index f0d82ff..0f8888a 100644
--- a/java/dexpreopt_config.go
+++ b/java/dexpreopt_config.go
@@ -89,7 +89,7 @@
frameworkModules := global.BootJars.CopyOf()
frameworkModules.RemoveList(artModules)
- artSubdir := "apex/com.android.art/javalib"
+ artSubdir := "apex/art_boot_images/javalib"
frameworkSubdir := "system/framework"
// ART config for the primary boot image in the ART apex.
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 480f9b7..edb8b30 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -404,13 +404,21 @@
// ctx's Platform or Specific functions represent where this sysprop_library installed.
installedInSystem := ctx.Platform() || ctx.SystemExtSpecific()
installedInVendorOrOdm := ctx.SocSpecific() || ctx.DeviceSpecific()
+ installedInProduct := ctx.ProductSpecific()
isOwnerPlatform := false
- stub := "sysprop-library-stub-"
+ var stub string
+
+ if installedInVendorOrOdm {
+ stub = "sysprop-library-stub-vendor"
+ } else if installedInProduct {
+ stub = "sysprop-library-stub-product"
+ } else {
+ stub = "sysprop-library-stub-platform"
+ }
switch m.Owner() {
case "Platform":
// Every partition can access platform-defined properties
- stub += "platform"
isOwnerPlatform = true
case "Vendor":
// System can't access vendor's properties
@@ -418,14 +426,12 @@
ctx.ModuleErrorf("None of soc_specific, device_specific, product_specific is true. " +
"System can't access sysprop_library owned by Vendor")
}
- stub += "vendor"
case "Odm":
// Only vendor can access Odm-defined properties
if !installedInVendorOrOdm {
ctx.ModuleErrorf("Neither soc_speicifc nor device_specific is true. " +
"Odm-defined properties should be accessed only in Vendor or Odm")
}
- stub += "vendor"
default:
ctx.PropertyErrorf("property_owner",
"Unknown value %s: must be one of Platform, Vendor or Odm", m.Owner())
diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go
index 711129c..3be1945 100644
--- a/sysprop/sysprop_test.go
+++ b/sysprop/sysprop_test.go
@@ -103,6 +103,8 @@
"api/sysprop-platform-on-product-latest.txt": nil,
"api/sysprop-vendor-current.txt": nil,
"api/sysprop-vendor-latest.txt": nil,
+ "api/sysprop-vendor-on-product-current.txt": nil,
+ "api/sysprop-vendor-on-product-latest.txt": nil,
"api/sysprop-odm-current.txt": nil,
"api/sysprop-odm-latest.txt": nil,
"framework/aidl/a.aidl": nil,
@@ -182,8 +184,15 @@
srcs: ["com/android/VendorProperties.sysprop"],
api_packages: ["com.android"],
property_owner: "Vendor",
+ vendor: true,
+ }
+
+ sysprop_library {
+ name: "sysprop-vendor-on-product",
+ srcs: ["com/android/VendorProperties.sysprop"],
+ api_packages: ["com.android"],
+ property_owner: "Vendor",
product_specific: true,
- vendor_available: true,
}
sysprop_library {
@@ -213,7 +222,7 @@
srcs: ["c.java"],
sdk_version: "system_current",
product_specific: true,
- libs: ["sysprop-platform", "sysprop-vendor"],
+ libs: ["sysprop-platform", "sysprop-vendor-on-product"],
}
java_library {
@@ -240,7 +249,7 @@
name: "cc-client-product",
srcs: ["d.cpp"],
product_specific: true,
- static_libs: ["sysprop-platform-on-product", "sysprop-vendor"],
+ static_libs: ["sysprop-platform-on-product", "sysprop-vendor-on-product"],
}
cc_library {
@@ -290,6 +299,12 @@
soc_specific: true,
sdk_version: "core_current",
}
+
+ java_library {
+ name: "sysprop-library-stub-product",
+ product_specific: true,
+ sdk_version: "core_current",
+ }
`)
// Check for generated cc_library
@@ -317,13 +332,14 @@
expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available)
}
- // core variant of vendor-owned sysprop_library is for product
- ctx.ModuleForTests("libsysprop-vendor", variant)
+ // product variant of vendor-owned sysprop_library
+ ctx.ModuleForTests("libsysprop-vendor-on-product", variant)
}
ctx.ModuleForTests("sysprop-platform", "android_common")
ctx.ModuleForTests("sysprop-platform_public", "android_common")
ctx.ModuleForTests("sysprop-vendor", "android_common")
+ ctx.ModuleForTests("sysprop-vendor-on-product", "android_common")
// Check for exported includes
coreVariant := "android_arm64_armv8-a_static"
@@ -336,7 +352,7 @@
platformOnProductPath := "libsysprop-platform-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include"
vendorInternalPath := "libsysprop-vendor/android_vendor.VER_arm64_armv8-a_static/gen/sysprop/include"
- vendorPublicPath := "libsysprop-vendor/android_arm64_armv8-a_static/gen/sysprop/public/include"
+ vendorPublicPath := "libsysprop-vendor-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include"
platformClient := ctx.ModuleForTests("cc-client-platform", coreVariant)
platformFlags := platformClient.Rule("cc").Args["cFlags"]