diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go index 116c833e0..35f60979f 100644 --- a/java/dexpreopt_bootjars.go +++ b/java/dexpreopt_bootjars.go @@ -816,7 +816,7 @@ func buildBootImageVariant(ctx android.ModuleContext, image *bootImageVariant, p cmd.FlagWithArg("--instruction-set-features=", global.InstructionSetFeatures[arch]) } - if global.EnableUffdGc { + if global.EnableUffdGc && image.target.Os == android.Android { cmd.Flag("--runtime-arg").Flag("-Xgc:CMC") }