Merge "Prepare multiproduct_kati to run on the build servers"
diff --git a/android/variable.go b/android/variable.go
index ef5b13c..666d729 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -67,6 +67,13 @@
 			Cflags []string
 		}
 
+		// treble is true when a build is a Treble compliant device.  This is automatically set when
+		// a build is shipped with Android O, but can be overriden.  This controls such things as
+		// the sepolicy split and enabling the Treble linker namespaces.
+		Treble struct {
+			Cflags []string
+		}
+
 		// debuggable is true for eng and userdebug builds, and can be used to turn on additional
 		// debugging features that don't significantly impact runtime behavior.  userdebug builds
 		// are used for dogfooding and performance testing, and should be as similar to user builds
@@ -130,6 +137,7 @@
 	Eng                        *bool `json:",omitempty"`
 	EnableCFI                  *bool `json:",omitempty"`
 	Device_uses_hwc2           *bool `json:",omitempty"`
+	Treble                     *bool `json:",omitempty"`
 
 	VendorPath *string `json:",omitempty"`
 
diff --git a/cc/builder.go b/cc/builder.go
index a4fda5b..f8b3e02 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -180,10 +180,10 @@
 	// Abidiff check turned on in advice-only mode. Builds will not fail on abi incompatibilties / extensions.
 	sAbiDiff = pctx.AndroidStaticRule("sAbiDiff",
 		blueprint.RuleParams{
-			Command:     "$sAbiDiffer -advice-only -o ${out} -new $in -old $referenceDump",
+			Command:     "$sAbiDiffer -lib $libName -arch $arch -advice-only -o ${out} -new $in -old $referenceDump",
 			CommandDeps: []string{"$sAbiDiffer"},
 		},
-		"referenceDump")
+		"referenceDump", "libName", "arch")
 )
 
 func init() {
@@ -642,6 +642,8 @@
 		Implicit:    referenceDump,
 		Args: map[string]string{
 			"referenceDump": referenceDump.String(),
+			"libName":       baseName,
+			"arch":          ctx.Arch().ArchType.Name,
 		},
 	})
 	return android.OptionalPathForPath(outputFile)
diff --git a/cc/config/mips_device.go b/cc/config/mips_device.go
index 9e27f37..ec8f133 100644
--- a/cc/config/mips_device.go
+++ b/cc/config/mips_device.go
@@ -92,7 +92,6 @@
 			"-mfp32",
 			"-modd-spreg",
 			"-mno-fused-madd",
-			"-Wa,-mmxu",
 			"-mno-synci",
 		},
 		"mips32r2dsp-fp": []string{