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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365897
91177308-0d34-0410-b5e6-
96231b3b80d8
foreach(target, all_targets) {
value = "$value${invoker.value}($target)\n"
}
+ if (all_targets == []) {
+ not_needed(invoker, [ "value" ])
+ }
values = [ "${invoker.key}=$value" ]
}
}