Allow the clang version used for bindgen to be configured.
This is useful when experimenting with new compiler flags that the existing compiler does not support. Change-Id: I45b8a2980b247d60a7f4e2ba55169267aeceef2b
This commit is contained in:
parent
18417cbd72
commit
9a868f1238
1 changed files with 9 additions and 2 deletions
|
@ -31,12 +31,19 @@ var (
|
|||
// bindgen should specify its own Clang revision so updating Clang isn't potentially blocked on bindgen failures.
|
||||
bindgenClangVersion = "clang-r399163b"
|
||||
|
||||
_ = pctx.VariableFunc("bindgenClangVersion", func(ctx android.PackageVarContext) string {
|
||||
if override := ctx.Config().Getenv("LLVM_BINDGEN_PREBUILTS_VERSION"); override != "" {
|
||||
return override
|
||||
}
|
||||
return bindgenClangVersion
|
||||
})
|
||||
|
||||
//TODO(b/160803703) Use a prebuilt bindgen instead of the built bindgen.
|
||||
_ = pctx.HostBinToolVariable("bindgenCmd", "bindgen")
|
||||
_ = pctx.SourcePathVariable("bindgenClang",
|
||||
"${cc_config.ClangBase}/${config.HostPrebuiltTag}/"+bindgenClangVersion+"/bin/clang")
|
||||
"${cc_config.ClangBase}/${config.HostPrebuiltTag}/${bindgenClangVersion}/bin/clang")
|
||||
_ = pctx.SourcePathVariable("bindgenLibClang",
|
||||
"${cc_config.ClangBase}/${config.HostPrebuiltTag}/"+bindgenClangVersion+"/lib64/")
|
||||
"${cc_config.ClangBase}/${config.HostPrebuiltTag}/${bindgenClangVersion}/lib64/")
|
||||
|
||||
//TODO(ivanlozano) Switch this to RuleBuilder
|
||||
bindgen = pctx.AndroidStaticRule("bindgen",
|
||||
|
|
Loading…
Reference in a new issue