1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[gn] Tag unneeded variable.

When only building targets without assembly parsers (e.g. `llvm_targets_to_build
= ["NVPTX"]`), `all_targets` is empty and causes GN to warn about an
assigned-but-unused variable.

Differential Revision: https://reviews.llvm.org/D31727

llvm-svn: 365897
This commit is contained in:
Bryant Wong 2019-07-12 13:09:39 +00:00
parent e93978cee8
commit 33a7a98680

View File

@ -383,6 +383,9 @@ template("write_target_def_file") {
foreach(target, all_targets) {
value = "$value${invoker.value}($target)\n"
}
if (all_targets == []) {
not_needed(invoker, [ "value" ])
}
values = [ "${invoker.key}=$value" ]
}
}