Renderscript: rename .rs extension to .rscript
Reserve .rs extension for Rust. Bug: 137365032 Test: make checkbuild Test: cd frameworks/compile/slang/tests ./slang_tests.py Test: atest CtsRenderscriptTestCases Test: CtsRsCppTestCases Exempt-From-Owner-Approval: Clean CP Change-Id: I0458009b8bb64a012fece364835d5b78d52e15e9 Merged-In: I0458009b8bb64a012fece364835d5b78d52e15e9 (cherry picked from commit41ce1c0d82
) (cherry picked from commita50b16974a
)
This commit is contained in:
committed by
Jeffrey Vander Stoep
parent
4a3c9cd600
commit
8b2bd15423
@@ -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)
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
2
cc/rs.go
2
cc/rs.go
@@ -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())
|
||||
|
Reference in New Issue
Block a user