[all-commits] [llvm/llvm-project] f50a7c: [LinkerWrapper] Fix optimized debugging builds for...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Sep 27 08:49:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f50a7c7a26e074231cc9a60a3fcaef7520ceb67f
      https://github.com/llvm/llvm-project/commit/f50a7c7a26e074231cc9a60a3fcaef7520ceb67f
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M clang/test/Driver/linker-wrapper.c
    M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

  Log Message:
  -----------
  [LinkerWrapper] Fix optimized debugging builds for NVPTX LTO

The ptxas assembler does not allow the `-g` flag along with
optimizations. Normally this is degraded to line info in the driver, but
when using LTO we did not have this step and the linker wrapper was not
correctly degrading the option. Note that this will not work if the user
does not pass `-g` again to the linker invocation. That will require
setting some flags in the binary to indicate that debugging was used
when building.

This fixes #57990

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D134660




More information about the All-commits mailing list