Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libc++ 17.0.6 #2

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

solemnwarning
Copy link
Contributor

This commit imports the sources/headers from libc++ 17.0.6 and updates the VS project to build it for improved C++20 support.

VS2022 is required for the C++20 compiler support.

Copy link
Contributor

@ColinFinck ColinFinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your work and the conversation via e-mail!

Something seems to be off with the encoding of the changed libc++.vcxproj and libc++.vcxproj.filters files. The diff view of GitHub shows every line as changed when that shouldn't be the case.
Could you check and fix that, so I can continue the review?

Has this also been tested with VS2019 or the new version VS2022-only?

@solemnwarning
Copy link
Contributor Author

Hi Colin,

VS automatically converted the project files to CRLF line endings on save, I've changed them back to LF so the changes show up correctly on GitHub.

I haven't tried this final version with VS2019, as I had issues both with the compiler's incomplete C++20 support and unrelated issues with the older lld-link.exe and moved on.

Comment on lines +24 to +29
<ClCompile Include="filesystem\directory_entry.cpp" />
<ClCompile Include="filesystem\directory_iterator.cpp" />
<ClCompile Include="filesystem\filesystem_clock.cpp" />
<ClCompile Include="filesystem\filesystem_error.cpp" />
<ClCompile Include="filesystem\operations.cpp" />
<ClCompile Include="filesystem\path.cpp" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@solemnwarning I recall from our conversation that you had problems with std::filesystem and disabled it entirely.
If that is still the case, we can probably skip compiling everything from the filesystem subdirectory, just like I did for libc++ 11 and VS2019.

Or is std::filesystem supported now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to re-enable it for one of the libraries I'm using in rehex, however the compile errors went away like magic, it might depend exactly what std::filesystem functionality is being used in the application.

I had another issue where libc++'s std::chrono was linking against GetSystemTimePreciseAsFileTime(), which I made a note of to investigate and fix later (probably with another wrapper in EnlyzeWinCompatLib), but when I went to do that, it had resolved itself.

I think perhaps I was compiling with the wrong _WIN32_WINNT at some point, and exactly how much works on what Windows version is going to depend on exactly what C++ functionality the final application is using.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as an FYI, I threw this together to verify libc++ in general still works in NT4: https://github.com/solemnwarning/nt4-exe-test

It uses a bit of STL, and threads/atomics/exceptions, which is obviously leaving large swathes of libc++ untested... it would be nice to get libc++'s test suite compiled and running on an NT4 target, but thats probably a huge amount of work neither of us really want to get into right now :D

Copy link
Contributor

@ColinFinck ColinFinck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it out and works like a breeze with our C++ software. Just one more suggestion until this can be merged.
Thanks a lot for your effort! 👍

src/libc++.vcxproj Outdated Show resolved Hide resolved
This commit imports the sources/headers from libc++ 17.0.6 and updates the VS
project to build it for improved C++20 support.

VS2022 is required for the C++20 compiler support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants