[cfe-users] Compiling on network share using relative paths fails

Telium Technical Support via cfe-users cfe-users at lists.llvm.org
Wed Sep 9 10:41:41 PDT 2020


I think this is a bug.but it's so big that I can't believe I'm the first
person to find it.  Perhaps someone can help me find a workaround.

 

I discovered that clang++ will not find a source file if it is located on a
network share (if using a relative path). For example, I have place the same
file "main.cpp" into C:\temp (a local drive) and T:\temp (a network SMB
share).

 

If I change pwd to C:\temp the following line works:

 

C:\android\cmdline-tools\ndk\21.1.6352462/toolchains/llvm/prebuilt/windows-x
86_64/bin/clang++ main.cpp

 

but if I change pwd to T:\temp the above line does NOT work (can't find
file). However, if I specify the full path for the source file for clang++
T:\temp\main.cpp then it works.

 

Since my make files are generated (using qmake) I have no control over the
paths passed to clang++. Can someone explain why clang++ can't find source
files on network shares (using relative paths), and how to fix this?

 

In case it matters, I'm running on Win10 64 bit.  I've tried putting source
files on an SMB share, and a NFS share.and the results are the same.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20200909/5e0a4bab/attachment.html>


More information about the cfe-users mailing list