[llvm-bugs] [Bug 37018] New: Thin LTO .map files refer to non-existing files (got renamed).

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 5 11:42:20 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37018

            Bug ID: 37018
           Summary: Thin LTO .map files refer to non-existing files (got
                    renamed).
           Product: lld
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: huangs at google.com
                CC: llvm-bugs at lists.llvm.org

If we use LTO and generate .map files, the resulting file contains links to
files such as

  - lto.tmp
  - thinlto-cache/Thin-766634.tmp.o

However, these files don't exist, because they got renamed to files like

  - thinlto-cache/llvmcache-8AA1E24EA41F4393454B37AE85516B593FBC0476

As a result, the data in .map file are not as useful as they should be.


For my specific case, the problem is encountered for Chromium (Linux)
######## Repro instructions ########

cd chrome/src   # Wherever this is.
gn gen out/test
gn args out/test  # Launches editor.

#### Paste the following into the
is_debug = false
is_official_build = true
generate_linker_map = true
use_lld = true
use_thin_lto = true
#### Save and close

ninja -j100 -l15 -C out/test zucchini

cd out/test
gunzip zucchini.map.gz
# Open zucchini.map, note ref to lto.tmp & thinlto-cache/Thin-*.tmp.o files.
cd thinlto-cache
ls  # See llvmcache-* files, but no lto.tmp or Thin-*.tmp.o files.
########

Looks like the renaming code lives in .../llvm/lib/LTO/Cachine.cpp , but .map
file is generated before rename occurs?  Perhaps we should have .map refer to
final file names, or also provide a map from temp files to final files?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180405/d0d9caf0/attachment.html>


More information about the llvm-bugs mailing list