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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Thanks!
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn | ||
---|---|---|
389 | nit: I'd keep the loop out of the if and do if (all_targets == []) { not_needed(invoker, [ "value" ]) } `` after the loop instead. |
Comment Actions
I checked this in at https://reviews.llvm.org/rL365897 but made a copy-paste mistake that referenced https://reviews.llvm.org/D31727 in the commit message instead of this differential. ):
nit: I'd keep the loop out of the if and do