[llvm-dev] TempFile::keep() issue on WIndows

Snider, Todd via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 18 16:12:12 PDT 2021


Hi All,

I've run into an issue trying to run an llvm-ar executable built on Windows 10 on a Windows 7 machine.

I get a permission denied error when the archiver tries to write the new archive file:

%> llvm-ar rv mylib.lib foo.o
llvm-ar.exe: warning: creating mylib.lib
llvm-ar.exe: error: mylib.lib: permission denied

I've tracked the issue down to a call to ::GetFinalPathByHandle() from realPathFromHandle() (defined in llvm/lib/Support/Windows/Path.inc).
realPathFromHandle() will set an error code when ::GetFinalPathByHandle() returns a value of 0 (as it does in the above case).

Is there a known incompatibility/limitation/bug with trying to run the Windows 10 kernel version of GetFinalPathByHandle() on a Windows 7 machine?

~ Todd Snider


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210318/567634e0/attachment.html>


More information about the llvm-dev mailing list