gn2bp: Update is_header_generated in the BaseActionSanitizer
Test: ./update_results.sh
Change-Id: I133dfdd72cb35ed9e47e64ef84b5c2f66e28580e
diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp
index 3053d5d..032e5d7 100755
--- a/tools/gn2bp/gen_android_bp
+++ b/tools/gn2bp/gen_android_bp
@@ -733,7 +733,7 @@
# Whether this target generates header files
def is_header_generated(self):
- return False
+ return any(os.path.splitext(it)[1] == '.h' for it in self.target.outputs)
class WriteBuildDateHeaderSanitizer(BaseActionSanitizer):
def get_args(self):
@@ -901,9 +901,6 @@
# Pipe response file contents into script
module.cmd = 'echo \'%s\' |%s%s' % (target.response_file_contents, NEWLINE, module.cmd)
- if any(os.path.splitext(it)[1] == '.h' for it in target.outputs):
- module.genrule_headers.add(bp_module_name)
-
# gn treats inputs and sources for actions equally.
# soong only supports source files inside srcs, non-source files are added as
# tool_files dependency.