[llvm-bugs] [Bug 46659] New: Support "filesystem" on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 9 10:11:09 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46659

            Bug ID: 46659
           Summary: Support "filesystem" on Windows
           Product: libc++
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: svnpenn at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Using this file:

    #include <filesystem>
    #include <iostream>
    namespace fs = std::filesystem;
    int main() {
       std::cout << fs::current_path() << std::endl;
    }

and this compiler:

https://packages.msys2.org/package/mingw-w64-x86_64-gcc

and this command:

    g++.exe -std=c++17 -static a.cpp

everything works as expected. However if I use this compiler:

https://github.com/mstorsjo/llvm-mingw

then I get this result:

    lld-link: error: undefined symbol:
       std::__1::__fs::filesystem::__current_path(std::__1::error_code*)
    >>> referenced by
       C:\Windows\TEMP\a-27a261.o:(std::__1::__fs::filesystem::current_path())
    clang-10: error: linker command failed with exit code 1 (use -v to see
       invocation)

its mentioned here, that the reason is because LibCxx doesnt currently support
"filesystem" on Windows:

https://github.com/mstorsjo/llvm-mingw/issues/62#issuecomment-554718348

I think if GCC support "filesystem", then LLVM should too.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200709/1d7289fd/attachment.html>


More information about the llvm-bugs mailing list