From 5922f3cb6e7310350ce76e555f55f1babebb27c8 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 25 Oct 2017 15:20:50 -0700 Subject: [PATCH] Switch instruction_set to *string So that the contents gets replaced when prepended/appended instead of merged. Test: Set instruction_set in a cc_defaults, and in a module. Change-Id: I0f2c789231d89efa1ab053f9dc118cd19f11b0e6 --- cc/compiler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/compiler.go b/cc/compiler.go index 102bc7a48..0a2d7bd7d 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -62,7 +62,7 @@ type BaseCompilerProperties struct { // the instruction set architecture to use to compile the C/C++ // module. - Instruction_set string `android:"arch_variant"` + Instruction_set *string `android:"arch_variant"` // list of directories relative to the root of the source tree that will // be added to the include path using -I. @@ -277,7 +277,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag "-D__ANDROID_API__=__ANDROID_API_FUTURE__", "-D__ANDROID_VNDK__") } - instructionSet := compiler.Properties.Instruction_set + instructionSet := proptools.String(compiler.Properties.Instruction_set) if flags.RequiredInstructionSet != "" { instructionSet = flags.RequiredInstructionSet }