[LLVMbugs] [Bug 12560] New: Would be nice if linker stub is guaranteed to be writable.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 14 15:52:21 PDT 2012


             Bug #: 12560
           Summary: Would be nice if linker stub is guaranteed to be
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-ld
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sigmund_vik at yahoo.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

If llvm-stub.exe is read-only (this is the case if it for instance is checked
in to the Perforce version control system), then after llvm-ld copies the stub
the destination stub will be read-only as well.

This can cause scripts to fail when cleaning up temp directories because they
contain files that are read-only.  E.g. in python, shutil.rmtree() will fail if
the tree contains a read-only file.

The code change for this is to add:

  if (0 != sys::Path(OutputFilename).makeWriteableOnDisk(&ErrMsg))
    PrintAndExit(ErrMsg, M);

to llvm-ld.cpp in EmitShellScript() after the call to sys::CopyFile().

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