Support .rs and .fs files in cc_* module srcs lists
Translate .rs and .fs files to .cpp files using llvm-rs-cc.
Test: builds
Change-Id: I242cea0d09c9985730a512cec7705c3f1479f4ed
diff --git a/cc/config/global.go b/cc/config/global.go
index 8c24289..43ff975 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -151,6 +151,12 @@
pctx.StaticVariable("RSLLVMPrebuiltsPath", "${RSClangBase}/${HostPrebuiltTag}/${RSClangVersion}/bin")
pctx.StaticVariable("RSIncludePath", "${RSLLVMPrebuiltsPath}/../lib64/clang/${RSReleaseVersion}/include")
+ pctx.PrefixedPathsForOptionalSourceVariable("RsGlobalIncludes", "-I",
+ []string{
+ "external/clang/lib/Headers",
+ "frameworks/rs/script_api/include",
+ })
+
pctx.VariableFunc("CcWrapper", func(config interface{}) (string, error) {
if override := config.(android.Config).Getenv("CC_WRAPPER"); override != "" {
return override + " ", nil