Merge "Set incremental or codegen-units, not both" into main am: ed75eef953 am: 72fd3d4e86 am: 25cb5d5dd4

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786923

Change-Id: Ie5feba894ec2ab32265dce301775e8f58c6b51c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chris Wailes
2023-10-13 23:04:51 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -44,7 +44,6 @@ var (
GlobalRustFlags = []string{
"-Z stack-protector=strong",
"-Z remap-cwd-prefix=.",
"-C codegen-units=1",
"-C debuginfo=2",
"-C opt-level=3",
"-C relocation-model=pic",
@@ -55,7 +54,7 @@ var (
// This flag requires to have no space so that when it's exported to bazel
// it can be removed. See aosp/2768339
"--color=always",
"-Zdylib-lto",
"-Z dylib-lto",
"-Z link-native-libraries=no",
}