From c28f5d97a6170ec0974da34051d1f9a23730e763 Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Thu, 25 Feb 2021 01:23:58 +0000 Subject: [PATCH] reverses common and external Clang flags Flags for external projects are specialisations of the common flags, and need to follow the common flags, not precede them. Bug: 181177782 Test: None Change-Id: I19c8c2a3539573e9b2f2d9e3e1c898fa09570663 --- cc/compiler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/compiler.go b/cc/compiler.go index e96295c2a..2e71922e1 100644 --- a/cc/compiler.go +++ b/cc/compiler.go @@ -442,7 +442,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps fmt.Sprintf("${config.%sClangGlobalCflags}", hod)) if isThirdParty(modulePath) { - flags.Global.CommonFlags = append([]string{"${config.ClangExternalCflags}"}, flags.Global.CommonFlags...) + flags.Global.CommonFlags = append(flags.Global.CommonFlags, "${config.ClangExternalCflags}") } if tc.Bionic() {