[llvm-bugs] [Bug 39782] New: cc1as breaks hard-linked cache entries of ccache

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Nov 25 20:35:18 PST 2018


            Bug ID: 39782
           Summary: cc1as breaks hard-linked cache entries of ccache
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mail+llvm at tzik.jp
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

As cc1as overwrites the output file without using a temporary file, it breaks
hard-linked cache entries of ccache. Here is the corresponding ccache issue:

That is, `cmp bar.o baz.o` at the last line of below should not hit.

 echo '.octa 0x0' | clang -cc1as -triple x86_64-pc-linux-gnu - -o foo.o
 ln -f foo.o bar.o
 cp foo.o baz.o
 echo '.octa 0x1' | clang -cc1as -triple x86_64-pc-linux-gnu - -o foo.o
 cmp bar.o baz.o

cc1as opens the file directly here[1], while other tools uses the temp file
through CompilerInstance[2]. 

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/20181126/7edeebe7/attachment.html>

More information about the llvm-bugs mailing list