[all-commits] [llvm/llvm-project] 2aa998: [gn] Add explicit deps on TargetParser

Nico Weber via All-commits all-commits at lists.llvm.org
Tue Dec 20 07:09:59 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2aa998d22fe09191cd6c1b697e373266c1131502
      https://github.com/llvm/llvm-project/commit/2aa998d22fe09191cd6c1b697e373266c1131502
  Author: Nico Weber <thakis at chromium.org>
  Date:   2022-12-20 (Tue, 20 Dec 2022)

  Changed paths:
    M llvm/utils/gn/secondary/bolt/lib/Core/BUILD.gn
    M llvm/utils/gn/secondary/bolt/lib/Passes/BUILD.gn
    M llvm/utils/gn/secondary/bolt/lib/Rewrite/BUILD.gn
    M llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/portability/BUILD.gn
    M llvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
    M llvm/utils/gn/secondary/clang-tools-extra/modularize/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/ARCMigrate/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/CodeGen/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/CrossTU/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/ExtractAPI/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Frontend/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Interpreter/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Lex/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Parse/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Sema/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Serialization/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Tooling/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Tooling/DependencyScanning/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/clang-import-test/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/clang-linker-wrapper/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/clang-offload-bundler/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/ASTMatchers/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/CodeGen/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/Driver/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/Frontend/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/Interpreter/BUILD.gn
    M llvm/utils/gn/secondary/clang/unittests/Tooling/BUILD.gn
    M llvm/utils/gn/secondary/lld/COFF/BUILD.gn
    M llvm/utils/gn/secondary/lld/Common/BUILD.gn
    M llvm/utils/gn/secondary/lld/ELF/BUILD.gn
    M llvm/utils/gn/secondary/lld/MachO/BUILD.gn
    M llvm/utils/gn/secondary/lld/MinGW/BUILD.gn
    M llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
    M llvm/utils/gn/secondary/lld/wasm/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Core/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Host/macosx/objcxx/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/ABI/X86/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/Disassembler/LLVMC/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Windows-DYLD/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/ExpressionParser/Clang/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/Breakpad/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/PECOFF/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/Platform/MacOSX/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/Process/Linux/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/Process/gdb-remote/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/NativePDB/BUILD.gn
    M llvm/utils/gn/secondary/lldb/source/Utility/BUILD.gn
    M llvm/utils/gn/secondary/lldb/utils/lit-cpuid/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Bitcode/Reader/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Bitcode/Writer/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/CodeGen/AsmPrinter/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/CodeGen/SelectionDAG/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/DWARFLinker/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/DebugInfo/DWARF/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/DebugInfo/GSYM/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/DebugInfo/LogicalView/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/DebugInfo/Symbolize/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/JITLink/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/TargetProcess/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/RuntimeDyld/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/FuzzMutate/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/InterfaceStub/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/LTO/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Linker/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/MC/MCDisassembler/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/MC/MCParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Object/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ObjectYAML/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ProfileData/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ProfileData/Coverage/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AArch64/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AArch64/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCA/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/Utils/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/ARM/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/ARM/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/ARM/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/AVR/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/BPF/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/BPF/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Hexagon/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/LoongArch/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Mips/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Mips/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Mips/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/NVPTX/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/NVPTX/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/PowerPC/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/RISCV/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/RISCV/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Sparc/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Sparc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/Sparc/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/SystemZ/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/X86/MCA/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Target/X86/MCTargetDesc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/TargetParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/TextAPI/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-dlltool/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/ToolDrivers/llvm-lib/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Transforms/CFGuard/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Transforms/IPO/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Transforms/Instrumentation/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/WindowsDriver/BUILD.gn
    M llvm/utils/gn/secondary/llvm/lib/XRay/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/bugpoint/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/dsymutil/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/lli/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-ar/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-cfi-verify/lib/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-config/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-cov/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-cxxfilt/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-dwarfdump/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-dwarfutil/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-dwp/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/Mips/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/PowerPC/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/X86/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-gsymutil/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-ifs/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-isel-fuzzer/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-jitlink/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-libtool-darwin/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-lipo/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-lto/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-lto2/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-mc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-mca/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-ml/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-nm/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-objdump/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-opt-fuzzer/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-profgen/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-readobj/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-reduce/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-rtdyld/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-size/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-tli-checker/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/opt/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/sancov/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/ADT/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/BinaryFormat/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/CodeGen/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/DebugInfo/DWARF/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/DebugInfo/LogicalView/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/JITLink/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/MCJIT/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Frontend/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MC/AMDGPU/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MC/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MC/SystemZ/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MC/X86/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MI/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/MIR/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Object/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/AArch64/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/AMDGPU/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/ARM/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/PowerPC/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/WebAssembly/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Target/X86/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/TargetParser/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Transforms/IPO/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/Transforms/Vectorize/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/tools/llvm-cfi-verify/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/tools/llvm-exegesis/BUILD.gn
    M llvm/utils/gn/secondary/llvm/unittests/tools/llvm-mca/BUILD.gn

  Log Message:
  -----------
  [gn] Add explicit deps on TargetParser

This diff was generated by the following script:

    #!/usr/bin/env python3
    import os, subprocess
    r = subprocess.run('git show --pretty='' --name-only f09cf34d00'.split(),
                       stdout=subprocess.PIPE, text=True)
    for line in r.stdout.splitlines():
      if not line.endswith('CMakeLists.txt'): continue
      gn = 'llvm/utils/gn/secondary/' + os.path.dirname(line) + '/BUILD.gn'
      if not os.path.exists(gn): continue
      with open(gn) as f:
        contents = f.read()
      if contents.count('"//llvm/lib/Support",') == 1:
        contents = contents.replace(
            '"//llvm/lib/Support",',
            '"//llvm/lib/Support", "//llvm/lib/TargetParser",')
      elif contents.count(' deps = [') == 1:
        contents = contents.replace(
            ' deps = [',
            ' deps = [ "//llvm/lib/TargetParser",')
      else:
        print('needs manual fixup:', gn)
        continue
      with open(gn, 'w') as f:
        f.write(contents)

I then manually fixed up the BUILD.gn files for Support (should not depend on
TargetParser) and TargetParser (should depend on Support) and ran `gn format`
on all touched files.




More information about the All-commits mailing list