已合并
[Bug]: 【指定的是目录而非具体文件】增量构建重复构建 #8286
HsuYao创建于 9月22日
[Bug]: 【指定的是目录而非具体文件】增量构建重复构建 #8286
已合并
共 1 个文件变更+9-1
| @@ -872,7 +872,15 @@ action("selinux_check") { | |||
| 872 | ] | 872 | ] |
| 873 | } | 873 | } |
| 874 | 874 | ||
| 875 | - outputs = [ "$target_out_dir" ] | 875 | + # Fix: Declare specific output files instead of the entire target_out_dir. |
| 876 | + # The script produces all.cil and developer/all.cil via checkpolicy -o. | ||
| 877 | + # Declaring the directory as output caused repeated rebuilds because other | ||
| 878 | + # actions (build_policy, build_contexts, etc.) write to the same directory, | ||
| 879 | + # updating its mtime after selinux_check.stamp is created. | ||
| 880 | + outputs = [ | ||
| 881 | + "$target_out_dir/all.cil", | ||
| 882 | + "$target_out_dir/developer/all.cil", | ||
| 883 | + ] | ||
| 876 | 884 | ||
| 877 | deps = [ | 885 | deps = [ |
| 878 | ":build_contexts", | 886 | ":build_contexts", |