[cfe-users] Adding linker flag `-save-temps` resolves the clang-8 error: "unable to make temporary file"

Danijel DOMAZET via cfe-users cfe-users at lists.llvm.org
Thu Aug 13 02:59:10 PDT 2020


Thanks David.
Why do you think this could be about current dir?
Isn't it about TMP (or TEMP or TMPDIR) environment variables?

Thanks,
Danijel Domazet


On Thu, Aug 13, 2020 at 12:11 AM David Blaikie <dblaikie at gmail.com> wrote:

> Looks like it writes the files to the current directory - do you have
> permission to access the current directory?
>
> On Wed, Aug 12, 2020 at 6:28 AM Danijel DOMAZET via cfe-users
> <cfe-users at lists.llvm.org> wrote:
> >
> > Hi clang users,
> > I am using Windows10 + Cygwin + Eclipse +  LLVM toolchain to build a
> C/C++
> > project.
> >
> > The files compile fine, but linking with `clang++` fails with multiple
> > `error: unable to make temporary file: No such file or directory`.
> >
> >     clang++ -o test "source1.bc" "source2.bc" "source3.bc"
> >     clang-8: error: unable to make temporary file: No such file or
> directory
> >     clang-8: error: unable to make temporary file: No such file or
> directory
> >     clang-8: error: unable to make temporary file: No such file or
> directory
> >
> > Linker generates one error per each object file.
> >
> > However, when I add the `-save-temps` option to linker, it works OK.
> >
> > I am launching Eclipse.exe from within Cygwin. I have tried to set TMP,
> > TEMP to /temp, /temp/, /cygdrive/c/temp, etc, but nothing worked.
> >
> > What could be the problem?
> >
> > Thanks,
> > Danijel Domazet
> >
> >
> >
> > - Confidential -
> > _______________________________________________
> > cfe-users mailing list
> > cfe-users at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>

-- 
- Confidential -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20200813/d99e5fd0/attachment.html>


More information about the cfe-users mailing list