summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Vander Stoep <jeffv@google.com> 2019-07-15 19:08:37 -0700
committer Jeffrey Vander Stoep <jeffv@google.com> 2019-07-18 04:02:38 +0000
commit8b2bd1542353ec84d2535e766cde0e22a9c3c16e (patch)
tree4d2c22e68b90543867bce589e6149dc13700334d
parent4a3c9cd6000c5153cac3904bdb76fb6b55ce29e8 (diff)
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 commit 41ce1c0d828702e1328f8e90be5fb0abbfd8a3d0) (cherry picked from commit a50b16974a90d0abccbb30dc537d86ec7ae29bc6)
-rw-r--r--cc/compiler.go2
-rw-r--r--cc/gen.go2
-rw-r--r--cc/rs.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/cc/compiler.go b/cc/compiler.go
index fd6184b3a..0f9599ef8 100644
--- a/cc/compiler.go
+++ b/cc/compiler.go
@@ -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)
}
diff --git a/cc/gen.go b/cc/gen.go
index e5c41945e..f8007e6bc 100644
--- a/cc/gen.go
+++ b/cc/gen.go
@@ -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
diff --git a/cc/rs.go b/cc/rs.go
index fbc6bfba4..5951edbc3 100644
--- a/cc/rs.go
+++ b/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())