diff options
author | 2024-07-11 11:31:14 -0700 | |
---|---|---|
committer | 2024-07-11 11:33:11 -0700 | |
commit | 3d211a0567b8e7ff1910971bdf8edc7da5487cb3 (patch) | |
tree | 68dc8b9b7d71237e7736088c584a8bfc9f00da59 /rust/builder.go | |
parent | dc554b218d43cd92dbb028c9ef39a8fce7cbb9a6 (diff) |
Pass the `--cfg soong` flag when building rustdoc
This CL modifies Soong to pass the `--cfg soong` flag to the rustdoc
tool.
Test: m rustdoc
Bug: 303116432
Change-Id: I089edebe3c0450b9f9d4f97404bafb7e90ed1f8a
Diffstat (limited to 'rust/builder.go')
-rw-r--r-- | rust/builder.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/builder.go b/rust/builder.go index 1ce92f4ec..f469f56f8 100644 --- a/rust/builder.go +++ b/rust/builder.go @@ -520,6 +520,9 @@ func Rustdoc(ctx ModuleContext, main android.Path, deps PathDeps, // this flag. rustdocFlags = append(rustdocFlags, "-Z", "unstable-options", "--enable-index-page") + // Ensure we use any special-case code-paths for Soong. + rustdocFlags = append(rustdocFlags, "--cfg", "soong") + targetTriple := ctx.toolchain().RustTriple() // Collect rustc flags |