diff options
author | 2023-10-12 10:56:34 -0700 | |
---|---|---|
committer | 2023-10-12 10:56:34 -0700 | |
commit | 7c1b29c9a44c2554d4270b00645e6022e2ed93d4 (patch) | |
tree | deb8751e9fcfdb24abdbd3ed2b693b5f4a274e27 /rust/builder.go | |
parent | d56338cc6f99722ee0aee87874153b336732e58d (diff) |
Set incremental or codegen-units, not both
This CL changes the handling of Rust flags to only pass one of either
incremental or codegen-units. This is necessary because incremental
implies a codegen-units value of 128 and it may be overridden by the
separate codegen-units argument.
Test: TH
Change-Id: Ia474e4f9fc071d5054cb479ec9de550fa886677e
Diffstat (limited to 'rust/builder.go')
-rw-r--r-- | rust/builder.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rust/builder.go b/rust/builder.go index bea8ff717..fe2d03a0b 100644 --- a/rust/builder.go +++ b/rust/builder.go @@ -278,7 +278,9 @@ func transformSrctoCrate(ctx ModuleContext, main android.Path, deps PathDeps, fl if ctx.Config().IsEnvTrue("SOONG_RUSTC_INCREMENTAL") { incrementalPath := android.PathForOutput(ctx, "rustc").String() - rustcFlags = append(rustcFlags, "-Cincremental="+incrementalPath) + rustcFlags = append(rustcFlags, "-C incremental="+incrementalPath) + } else { + rustcFlags = append(rustcFlags, "-C codegen-units=1") } // Disallow experimental features |