rust: Pass additional Clang C flags from toolchain

The set of Clang flags passed to bindgen from the toolchain was
incomplete. In addition to ToolchainClangCflags(), we also need to call
ClangCflags().

Bug: 184081465
Test: m libgrpc_bindgen
Change-Id: I0b62345fee2f55ba18b4a0c4d825f0447c99db06
This commit is contained in:
Ivan Lozano 2021-04-23 10:25:35 -04:00
parent a0b235a9d9
commit 871e34290e
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ func (b *bindgenDecorator) GenerateSource(ctx ModuleContext, deps PathDeps) andr
// Toolchain clang flags
cflags = append(cflags, "-target "+ccToolchain.ClangTriple())
cflags = append(cflags, strings.ReplaceAll(ccToolchain.ClangCflags(), "${config.", "${cc_config."))
cflags = append(cflags, strings.ReplaceAll(ccToolchain.ToolchainClangCflags(), "${config.", "${cc_config."))
// Dependency clang flags and include paths