[all-commits] [llvm/llvm-project] a1f4e4: [clang][docs] Add note about using `-flto` with `-...

Philippe Blain via All-commits all-commits at lists.llvm.org
Tue Jun 30 09:33:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a1f4e48c4aca8c7339be2018926baf860a562f13
      https://github.com/llvm/llvm-project/commit/a1f4e48c4aca8c7339be2018926baf860a562f13
  Author: Philippe Blain <levraiphilippeblain at gmail.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M clang/docs/CommandGuide/clang.rst

  Log Message:
  -----------
  [clang][docs] Add note about using `-flto` with `-g` on macOS

If -Wl,object_path_lto,<lto-filename>.o is not passed at link time
when compiling and linking in separate steps with -flto and -g, the
temporary file used for Link Time Optimization is deleted by the linker,
so the executable is missing debug symbols and can't be easily debugged,
and dsymutil can't be run.

Document this behaviour.

Differential revision: https://reviews.llvm.org/D82733




More information about the All-commits mailing list