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: unassignedclangb...@nondot.org
          Reporter: svnp...@gmail.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to