Add an instruction_set property to Arch

Used to allow switching between thumb and arm ISAs

Change-Id: I94aa83cee7179e83c97eedc32fd216965b626d33
diff --git a/cc/cc.go b/cc/cc.go
index df3ba8c..1ebd762 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -126,6 +126,10 @@
 	// ldflags: list of module-specific flags that will be used for all link steps
 	Ldflags []string `android:"arch_variant"`
 
+	// instruction_set: the instruction set architecture to use to compile the C/C++
+	// module.
+	Instruction_set string `android:"arch_variant"`
+
 	// include_dirs: list of directories relative to the root of the source tree that will
 	// be added to the include path using -I.
 	// If possible, don't use this.  If adding paths from the current directory use
@@ -353,6 +357,11 @@
 		toolchain:  toolchain,
 		clang:      c.properties.Clang,
 	}
+	instructionSet := c.properties.Instruction_set
+	instructionSetFlags, err := toolchain.InstructionSetFlags(instructionSet)
+	if err != nil {
+		ctx.ModuleErrorf("%s", err)
+	}
 
 	if arch.HostOrDevice.Host() {
 		// TODO: allow per-module clang disable for host
@@ -411,6 +420,7 @@
 			flags.globalFlags = []string{
 				"${commonGlobalIncludes}",
 				toolchain.IncludeFlags(),
+				instructionSetFlags,
 				toolchain.ClangCflags(),
 				"${commonClangGlobalCflags}",
 				fmt.Sprintf("${%sClangGlobalCflags}", arch.HostOrDevice),
@@ -420,6 +430,7 @@
 			flags.globalFlags = []string{
 				"${commonGlobalIncludes}",
 				toolchain.IncludeFlags(),
+				instructionSetFlags,
 				toolchain.Cflags(),
 				"${commonGlobalCflags}",
 				fmt.Sprintf("${%sGlobalCflags}", arch.HostOrDevice),