Merge "Support Kotlin in Robolectric test"
diff --git a/cc/strip.go b/cc/strip.go
index c60e135..5c32d8b 100644
--- a/cc/strip.go
+++ b/cc/strip.go
@@ -56,7 +56,9 @@
 	forceEnable := Bool(stripper.StripProperties.Strip.All) ||
 		Bool(stripper.StripProperties.Strip.Keep_symbols) ||
 		Bool(stripper.StripProperties.Strip.Keep_symbols_and_debug_frame)
-	return !forceDisable && (forceEnable || defaultEnable)
+	// create_minidebuginfo doesn't work for riscv64 yet, disable stripping for now
+	riscv64 := actx.Arch().ArchType == android.Riscv64
+	return !forceDisable && (forceEnable || defaultEnable) && !riscv64
 }
 
 // Keep this consistent with //build/bazel/rules/stripped_shared_library.bzl.
diff --git a/java/lint.go b/java/lint.go
index 931820d..fcd6d31 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -473,20 +473,23 @@
 
 	cmd.FlagWithOutput("--write-reference-baseline ", baseline)
 
-	cmd.Text("|| (").Text("if [ -e").Input(text).Text("]; then cat").Input(text).Text("; fi; exit 7)")
+	cmd.Text("; EXITCODE=$?; ")
+
+	// The sources in the sandbox may have been modified by --apply-suggestions, zip them up and
+	// export them out of the sandbox.  Do this before exiting so that the suggestions exit even after
+	// a fatal error.
+	cmd.BuiltTool("soong_zip").
+		FlagWithOutput("-o ", android.PathForModuleOut(ctx, "lint", "suggested-fixes.zip")).
+		FlagWithArg("-C ", cmd.PathForInput(android.PathForSource(ctx))).
+		FlagWithInput("-r ", srcsList)
+
+	cmd.Text("; if [ $EXITCODE != 0 ]; then if [ -e").Input(text).Text("]; then cat").Input(text).Text("; fi; exit $EXITCODE; fi")
 
 	rule.Command().Text("rm -rf").Flag(lintPaths.cacheDir.String()).Flag(lintPaths.homeDir.String())
 
 	// The HTML output contains a date, remove it to make the output deterministic.
 	rule.Command().Text(`sed -i.tmp -e 's|Check performed at .*\(</nav>\)|\1|'`).Output(html)
 
-	// The sources in the sandbox may have been modified by --apply-suggestions, zip them up and
-	// export them out of the sandbox.
-	rule.Command().BuiltTool("soong_zip").
-		FlagWithOutput("-o ", android.PathForModuleOut(ctx, "lint", "suggested-fixes.zip")).
-		FlagWithArg("-C ", cmd.PathForInput(android.PathForSource(ctx))).
-		FlagWithInput("-r ", srcsList)
-
 	rule.Build("lint", "lint")
 
 	l.outputs = lintOutputs{
diff --git a/python/binary.go b/python/binary.go
index e6324a3..f4ad626 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -192,8 +192,8 @@
 		})
 	}
 
-	addTopDirectoriesToPath := !proptools.BoolDefault(binary.binaryProperties.Dont_add_top_level_directories_to_path, false)
-	dontAddEntrypointFolderToPath := proptools.BoolDefault(binary.binaryProperties.Dont_add_entrypoint_folder_to_path, false)
+	addTopDirectoriesToPath := !proptools.BoolDefault(binary.binaryProperties.Dont_add_top_level_directories_to_path, true)
+	dontAddEntrypointFolderToPath := proptools.BoolDefault(binary.binaryProperties.Dont_add_entrypoint_folder_to_path, true)
 
 	binFile := registerBuildActionForParFile(ctx, embeddedLauncher, launcherPath,
 		binary.getHostInterpreterName(ctx, actualVersion),
diff --git a/python/python.go b/python/python.go
index f6029c2..6f3a0ec 100644
--- a/python/python.go
+++ b/python/python.go
@@ -677,8 +677,7 @@
 		protoFlags := android.GetProtoFlags(ctx, &p.protoProperties)
 		protoFlags.OutTypeFlag = "--python_out"
 
-		// TODO(b/247578564): Change the default to true, and then eventually remove respect_pkg_path
-		protosRespectPkgPath := proptools.BoolDefault(p.properties.Proto.Respect_pkg_path, false)
+		protosRespectPkgPath := proptools.BoolDefault(p.properties.Proto.Respect_pkg_path, true)
 		pkgPathForProtos := pkgPath
 		if pkgPathForProtos != "" && protosRespectPkgPath {
 			pkgPathStagingDir := android.PathForModuleGen(ctx, "protos_staged_for_pkg_path")