From 2199995129e2295a279b057eebe4d90a1027bd79 Mon Sep 17 00:00:00 2001 From: Jingwen Chen Date: Wed, 19 May 2021 05:53:51 +0000 Subject: [PATCH] bp2build: export CommonGlobalIncludes to @soong_injection. Test: TH Fixes: 186035856 Change-Id: Iff336427694289c8913b58674e67fc0f792ad851 --- cc/config/global.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/cc/config/global.go b/cc/config/global.go index 59fe8e13c..d6eba0fb1 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -225,18 +225,19 @@ func init() { // Everything in these lists is a crime against abstraction and dependency tracking. // Do not add anything to this list. - pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I", - []string{ - "system/core/include", - "system/logging/liblog/include", - "system/media/audio/include", - "hardware/libhardware/include", - "hardware/libhardware_legacy/include", - "hardware/ril/include", - "frameworks/native/include", - "frameworks/native/opengl/include", - "frameworks/av/include", - }) + commonGlobalIncludes := []string{ + "system/core/include", + "system/logging/liblog/include", + "system/media/audio/include", + "hardware/libhardware/include", + "hardware/libhardware_legacy/include", + "hardware/ril/include", + "frameworks/native/include", + "frameworks/native/opengl/include", + "frameworks/av/include", + } + exportedVars.Set("CommonGlobalIncludes", commonGlobalIncludes) + pctx.PrefixedExistentPathsForSourcesVariable("CommonGlobalIncludes", "-I", commonGlobalIncludes) pctx.SourcePathVariable("ClangDefaultBase", ClangDefaultBase) pctx.VariableFunc("ClangBase", func(ctx android.PackageVarContext) string {