aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-08-11 23:56:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-08-11 23:56:43 +0000
commite43392af4a95cc949c02b84dbfbe6eabb8a5c0b5 (patch)
treecc7acdf8d786078b263a1cd7f68b5bbc03b2bc8c
parent40350ab4f2a3baaae4324197ff713c1a11105816 (diff)
parent1e7495d973f8fb846d82025be11853031ab1057b (diff)
downloadbuild_soong-e43392af4a95cc949c02b84dbfbe6eabb8a5c0b5.tar.gz
build_soong-e43392af4a95cc949c02b84dbfbe6eabb8a5c0b5.tar.bz2
build_soong-e43392af4a95cc949c02b84dbfbe6eabb8a5c0b5.zip
Merge "cflags for vendor variants" into oc-mr1-dev
-rw-r--r--cc/compiler.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/compiler.go b/cc/compiler.go
index cec527bf..c7fcca79 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -134,6 +134,10 @@ type BaseCompilerProperties struct {
// list of source files that should not be used to
// build the vendor variant of the C/C++ module.
Exclude_srcs []string
+
+ // List of additional cflags that should be used to build the vendor
+ // variant of the C/C++ module.
+ Cflags []string
}
}
@@ -392,6 +396,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag
flags.CppFlags = append([]string{"-std=" + cppStd}, flags.CppFlags...)
}
+ if ctx.vndk() {
+ flags.CFlags = append(flags.CFlags, esc(compiler.Properties.Target.Vendor.Cflags)...)
+ }
+
// We can enforce some rules more strictly in the code we own. strict
// indicates if this is code that we can be stricter with. If we have
// rules that we want to apply to *our* code (but maybe can't for