[LLVMbugs] [Bug 3488] New: llvm-ar r doesn't replace existing files

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Feb 5 02:20:36 PST 2009


http://llvm.org/bugs/show_bug.cgi?id=3488

           Summary: llvm-ar r doesn't replace existing files
           Product: tools
           Version: 2.4
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-ar
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jay.foad at antixlabs.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2499)
 --> (http://llvm.org/bugs/attachment.cgi?id=2499)
suggested fix

When llvm-ar is used with the "r" option to insert/replace files in an archive,
it only works if the files aren't in the archive already.

If the files are in the archive, they never seem to get updated.

You can see this by using "llvm-ar tv libname.a" which shows the timestamps of
the files in the archive. Try doing "llvm-ar crs libname.a somefile.o", touch
somefile.o, rerun the previous command and then look at the timestamps.


This seems to be due to a simple typo in doReplaceOrInsert() in
tools/llvm-ar/llvm-ar.cpp. Patch attached.


(Bug report and patch courtesy of Daniel Shelton.)


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list