Only return the source files of a Rust module with a SourceProvider if the internal compiler has been disabled
Test: mmma system/tools/aidl with assertOutput FIXMEs re-enabled
Change-Id: I84598ae2d1181656b7d68088f86ab016563e5d80
diff --git a/rust/rust.go b/rust/rust.go
index 17fd042..d302f27 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -92,7 +92,7 @@
func (mod *Module) OutputFiles(tag string) (android.Paths, error) {
switch tag {
case "":
- if mod.sourceProvider != nil {
+ if mod.sourceProvider != nil && (mod.compiler == nil || mod.compiler.Disabled()) {
return mod.sourceProvider.Srcs(), nil
} else {
if mod.outputFile.Valid() {