[all-commits] [llvm/llvm-project] 611d01: gn build: Support building debug binaries from a r...

Peter Collingbourne via All-commits all-commits at lists.llvm.org
Thu Jul 16 17:03:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 611d015f0030e0d4f1b3bd2270205f6f6b6e20eb
      https://github.com/llvm/llvm-project/commit/611d015f0030e0d4f1b3bd2270205f6f6b6e20eb
  Author: Peter Collingbourne <pcc at google.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/utils/gn/README.rst
    M llvm/utils/gn/build/BUILD.gn
    M llvm/utils/gn/build/BUILDCONFIG.gn
    M llvm/utils/gn/build/buildflags.gni
    M llvm/utils/gn/build/symlink_or_copy.gni
    M llvm/utils/gn/build/toolchain/BUILD.gn
    M llvm/utils/gn/secondary/BUILD.gn
    M llvm/utils/gn/secondary/bolt/tools/driver/BUILD.gn
    M llvm/utils/gn/secondary/clang-tools-extra/clang-doc/tool/BUILD.gn
    M llvm/utils/gn/secondary/clang-tools-extra/clangd/xpc/framework/BUILD.gn
    M llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
    M llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
    M llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-ar/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-cxxfilt/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod-find/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-debuginfod/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-dwp/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-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-rc/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-readobj/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-readtapi/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-size/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-strings/BUILD.gn
    M llvm/utils/gn/secondary/llvm/tools/llvm-symbolizer/BUILD.gn

  Log Message:
  -----------
  gn build: Support building debug binaries from a release build directory.

This change makes it so that all binaries in `bin` have a corresponding
debug binary target `$TARGET.dbg` that will build a debug binary in
`bin.dbg/$TARGET`. This is implemented using a separate toolchain for
the debug builds. This has the following advantages over a separate
debug build directory:

1. Can use release mode tblgen to generate code for the debug build
   binaries, which speeds up the build because it can run tblgen faster as
   well as being able to reuse the tblgen binary from the release build.

2. Can reuse runtimes built in the release mode clang's resource
   directory, avoiding the need to build them again with a slow debug
   build of clang.

Assisted-by: gemini

Reviewers: aeubanks, nico

Reviewed By: aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/197843



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list