Reland of GN(Android): Stop specifying depfile under outputs

Previous attempt:
https://codereview.chromium.org/2318673003/ )

Reason for reland:
Now creates depfile parent directory

Doing so is unnecessary (GN already knows that depfiles are generated by
their target), and causes the unwanted side-effect of changes to .d
files triggering rebuilds of dependent targets.

TBR=michaelbai@chromium.org,dpranke@chromium.org,lushnikov@chromium.org
BUG=639042

Review-Url: https://codereview.chromium.org/2315993003
Cr-Original-Commit-Position: refs/heads/master@{#416930}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: daef66ba0e2326d524e6429afdbb282b750c0ecc
This commit is contained in:
agrieve 2016-09-07 07:10:02 -07:00 коммит произвёл Commit bot
Родитель 45814d1bff
Коммит dd472005d0
3 изменённых файлов: 7 добавлений и 32 удалений

Просмотреть файл

@ -424,6 +424,7 @@ def AddDepfileOption(parser):
def WriteDepfile(path, dependencies):
MakeDirectory(os.path.dirname(path))
with open(path, 'w') as depfile:
depfile.write(path)
depfile.write(': ')

Просмотреть файл

@ -151,7 +151,6 @@ template("write_build_config") {
_rebased_deps_configs = rebase_path(_deps_configs, root_build_dir)
outputs = [
depfile,
build_config,
]
@ -386,15 +385,18 @@ template("copy_ex") {
sources = []
}
script = "//build/android/gyp/copy_ex.py"
depfile = "$target_gen_dir/$target_name.d"
_stamp_file = "$target_gen_dir/$target_name.stamp"
outputs = [
depfile,
_stamp_file,
]
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--stamp",
rebase_path(_stamp_file, root_build_dir),
"--dest",
rebase_path(invoker.dest, root_build_dir),
]
@ -610,7 +612,6 @@ template("test_runner_script") {
generated_script = "$root_build_dir/bin/run_${_test_name}"
outputs = [
depfile,
generated_script,
]
data += [ generated_script ]
@ -677,7 +678,6 @@ if (enable_java_templates) {
]
outputs = [
depfile,
_config_path,
_result_path,
]
@ -769,7 +769,6 @@ if (enable_java_templates) {
}
depfile = "${target_gen_dir}/${target_name}.d"
outputs = [
depfile,
_output_jar_path,
"$_output_jar_path.dump",
"$_output_jar_path.seeds",
@ -822,7 +821,6 @@ if (enable_java_templates) {
]
outputs = [
depfile,
_result_path,
]
@ -870,7 +868,6 @@ if (enable_java_templates) {
_build_config,
]
outputs = [
depfile,
java_script,
]
forward_variables_from(invoker, [ "deps" ])
@ -931,7 +928,6 @@ if (enable_java_templates) {
main_dex_rules = "//build/android/main_dex_classes.flags"
outputs = [
depfile,
_main_dex_list_path,
]
@ -968,7 +964,6 @@ if (enable_java_templates) {
script = "//build/android/gyp/dex.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
invoker.output,
]
@ -1160,7 +1155,6 @@ if (enable_java_templates) {
invoker.input_jar_path,
]
outputs = [
depfile,
_coverage_file,
_source_dirs_listing_file,
invoker.output_jar_path,
@ -1235,7 +1229,6 @@ if (enable_java_templates) {
}
outputs = [
depfile,
invoker.output_apk_path,
]
@ -1332,7 +1325,6 @@ if (enable_java_templates) {
invoker.keystore_path,
]
outputs = [
depfile,
invoker.output_apk_path,
]
data = [
@ -1469,7 +1461,6 @@ if (enable_java_templates) {
inputs += [ _resources_zip ]
}
outputs = [
depfile,
invoker.resource_packaged_apk_path,
]
@ -1564,7 +1555,6 @@ if (enable_java_templates) {
_android_manifest,
]
outputs = [
depfile,
_incremental_android_manifest,
]
@ -1999,7 +1989,6 @@ if (enable_java_templates) {
}
outputs = [
depfile,
_javac_jar_path,
_javac_jar_path + ".md5.stamp",
]
@ -2443,7 +2432,6 @@ if (enable_java_templates) {
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
zip_path,
srcjar_path,
r_text_path,
@ -2645,7 +2633,6 @@ if (enable_java_templates) {
script = "//build/android/gyp/generate_split_manifest.py"
outputs = [
depfile,
invoker.out_manifest,
]
inputs = [

Просмотреть файл

@ -49,7 +49,6 @@ template("create_native_executable_dist") {
android_readelf,
]
outputs = [
depfile,
_libraries_list,
]
rebased_binaries = rebase_path([ invoker.binary ], root_build_dir)
@ -184,7 +183,6 @@ if (enable_java_templates) {
depfile = "$target_gen_dir/$target_name.{{source_name_part}}.d"
sources = invoker.sources
outputs = [
depfile,
"${jni_output_dir}/{{source_name_part}}_jni.h",
]
@ -288,7 +286,6 @@ if (enable_java_templates) {
jar_file,
]
outputs = [
depfile,
"${jni_output_dir}/${classname}_jni.h",
]
@ -391,7 +388,6 @@ if (enable_java_templates) {
sources = invoker.sources
outputs = [
depfile,
"$_base_gen_dir/${invoker.package_name}/{{source_name_part}}.java",
]
@ -401,7 +397,7 @@ if (enable_java_templates) {
"--include-path",
rebase_path(_include_path, root_build_dir),
"--output",
rebase_path(outputs[1], root_build_dir),
rebase_path(outputs[0], root_build_dir),
"--template={{source}}",
]
@ -476,7 +472,6 @@ if (enable_java_templates) {
"--srcjar=$_rebased_srcjar_path",
] + _rebased_sources
outputs = [
depfile,
_srcjar_path,
]
}
@ -516,7 +511,6 @@ if (enable_java_templates) {
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
invoker.output,
]
@ -581,7 +575,6 @@ if (enable_java_templates) {
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
_resources_zip,
]
@ -651,7 +644,6 @@ if (enable_java_templates) {
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
_resources_zip,
]
@ -1822,7 +1814,6 @@ if (enable_java_templates) {
_build_config,
]
outputs = [
depfile,
"${_dist_ijar_path}",
]
data = [
@ -1952,7 +1943,6 @@ if (enable_java_templates) {
script = "//build/android/gyp/pack_relocations.py"
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
_native_libs_json,
]
@ -2143,7 +2133,6 @@ if (enable_java_templates) {
]
outputs = [
depfile,
_incremental_install_script_path,
]
@ -2500,7 +2489,6 @@ if (enable_java_templates) {
depfile = "${target_gen_dir}/${target_name}.d"
outputs = [
depfile,
srcjar_path,
]
rebased_imports = rebase_path(imports, root_build_dir)
@ -2571,7 +2559,6 @@ if (enable_java_templates) {
sources = invoker.sources
depfile = "$target_gen_dir/$target_name.d"
outputs = [
depfile,
srcjar_path,
]
args = [