From 44b6e02f35702c4984aa66655fd4018ac9810878 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 22 Sep 2019 15:42:40 +0000 Subject: [PATCH] gn build: consolidate "Nothing to do" branches in targets.gni No behavior change. llvm-svn: 372512 --- .../utils/gn/secondary/llvm/lib/Target/targets.gni | 25 ++++++---------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni b/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni index 5f84727..c3d6fe5 100644 --- a/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni +++ b/llvm/utils/gn/secondary/llvm/lib/Target/targets.gni @@ -39,7 +39,8 @@ if (llvm_targets_to_build == "host") { } # Validate that llvm_targets_to_build is set to a list of valid targets, -# and remember which targets are built. +# and remember which targets are built where needed (for conditionally-built +# unittest targets). llvm_build_AArch64 = false llvm_build_ARM = false llvm_build_BPF = false @@ -49,34 +50,20 @@ llvm_build_X86 = false foreach(target, llvm_targets_to_build) { if (target == "AArch64") { llvm_build_AArch64 = true - } else if (target == "AMDGPU") { - # Nothing to do. } else if (target == "ARM") { llvm_build_ARM = true - } else if (target == "AVR") { - # Nothing to do. } else if (target == "BPF") { llvm_build_BPF = true - } else if (target == "Hexagon") { - # Nothing to do. - } else if (target == "Lanai") { - # Nothing to do. - } else if (target == "Mips") { - # Nothing to do. - } else if (target == "NVPTX") { - # Nothing to do. } else if (target == "PowerPC") { llvm_build_PowerPC = true - } else if (target == "RISCV") { - # Nothing to do. - } else if (target == "Sparc") { - # Nothing to do. - } else if (target == "SystemZ") { - # Nothing to do. } else if (target == "WebAssembly") { llvm_build_WebAssembly = true } else if (target == "X86") { llvm_build_X86 = true + } else if (target == "AMDGPU" || target == "AVR" || target == "Hexagon" || + target == "Lanai" || target == "Mips" || target == "NVPTX" || + target == "RISCV" || target == "Sparc" || target == "SystemZ") { + # Nothing to do. } else { # FIXME: Port the remaining targets. assert(false, "Unknown target '$target'.") -- 2.7.4