<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support "filesystem" on Windows"
   href="https://bugs.llvm.org/show_bug.cgi?id=46659">46659</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Support "filesystem" on Windows
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>svnpenn@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using this file:

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

and this compiler:

<a href="https://packages.msys2.org/package/mingw-w64-x86_64-gcc">https://packages.msys2.org/package/mingw-w64-x86_64-gcc</a>

and this command:

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

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

<a href="https://github.com/mstorsjo/llvm-mingw">https://github.com/mstorsjo/llvm-mingw</a>

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:

<a href="https://github.com/mstorsjo/llvm-mingw/issues/62#issuecomment-554718348">https://github.com/mstorsjo/llvm-mingw/issues/62#issuecomment-554718348</a>

I think if GCC support "filesystem", then LLVM should too.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>