Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d211a05 authored by Chris Wailes's avatar Chris Wailes
Browse files

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
parent dc554b21
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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