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

Commit 38aaf75e authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by Gerrit Code Review
Browse files

Merge "Renderscript: rename .rs extension to .rscript"

parents ed1f4def d6126271
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
			"-I"+android.PathForModuleGen(ctx, "aidl").String())
	}

	if compiler.hasSrcExt(".rs") || compiler.hasSrcExt(".fs") {
	if compiler.hasSrcExt(".rscript") || compiler.hasSrcExt(".fs") {
		flags = rsFlags(ctx, flags, &compiler.Properties)
	}

+1 −1
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ func genSources(ctx android.ModuleContext, srcFiles android.Paths,
			depFile := android.GenPathWithExt(ctx, "aidl", srcFile, "cpp.d")
			srcFiles[i] = cppFile
			deps = append(deps, genAidl(ctx, aidlRule, srcFile, cppFile, depFile, buildFlags.aidlFlags)...)
		case ".rs", ".fs":
		case ".rscript", ".fs":
			cppFile := rsGeneratedCppFile(ctx, srcFile)
			rsFiles = append(rsFiles, srcFiles[i])
			srcFiles[i] = cppFile
+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ var (
		"depFiles", "outDir", "rsFlags", "stampFile")
)

// Takes a path to a .rs or .fs file, and returns a path to a generated ScriptC_*.cpp file
// Takes a path to a .rscript or .fs file, and returns a path to a generated ScriptC_*.cpp file
// This has to match the logic in llvm-rs-cc in DetermineOutputFile.
func rsGeneratedCppFile(ctx android.ModuleContext, rsFile android.Path) android.WritablePath {
	fileName := strings.TrimSuffix(rsFile.Base(), rsFile.Ext())