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

Upgrade to Clang 14 #241

Closed
PathogenDavid opened this issue Apr 14, 2022 · 1 comment
Closed

Upgrade to Clang 14 #241

PathogenDavid opened this issue Apr 14, 2022 · 1 comment
Labels
Area-Translation Issues concerning the translation from libclang into Biohazrd

Comments

@PathogenDavid
Copy link
Member

PathogenDavid commented Apr 14, 2022

Similar to #176, MSVC bumped their required Clang version again as of 2022 17.2.0p3. (This was done in microsoft/STL#2474)

Might be a good idea to revisit #199 while we're at it.

@PathogenDavid PathogenDavid added the Area-Translation Issues concerning the translation from libclang into Biohazrd label Apr 14, 2022
@PathogenDavid
Copy link
Member Author

  • git rebase --onto llvmorg-14.0.4 llvmorg-12.0.1 pathogen-main --interactive
  • Upgrade libClangSharp
    • Used version from dotnet/ClangSharp@624eed1
    • This time around instead of removing the nested namespaces I explicit specified C++17 via CMAKE_CXX_STANDARD in our build scripts. This gave me some aggressive STL4015 warnings relating to std::iterator. They're probably fine but A) I didn't have the energy to understand what they were complaining about and B) the fact that I got them indicates to me that the LLVM developers probably aren't testing Clang compiled as C++ 17 often and I felt like I was asking for trouble. (I did not let the build finish either, there could've been a lot more.)
    • I took a second look at what's changed in libClangSharp and it turns out not a whole lot. Therefore I decided to just manually apply the changes between dotnet/ClangSharp@700c805 and dotnet/ClangSharp@624eed1. (Especially since I forgot how much had to be ripped out of the ported files.)
    • I also updated the license of ClangSharp as it changed from NCSA to MIT when it moved to the .NET Foundation.
  • ClangSharp.Pathogen is now .NET 6 because ClangSharp.Interop is .NET 6. In theory we could probably install our own DllImportResolver for the .NET Standard, but .NET 5 was an STS release and went out of support a month ago. Moving from .NET 5 to .NET 6 should not be a substantial effort for anyone (especially if it's just the generator.) If someone happens to care we can revisit this.
  • By extension Biohazrd is also now .NET 6.

Clang 14 introduced a new "Using" type class. It's causing the ptrdiff_t_Namespaced and size_t_Namespaced tests to fail because type reduction no longer works on std::ptrdiff_t and std::size_t. Whatever the actual Type is for this type class is not exposed by libclang. Still investigating...

PathogenDavid added a commit to MochiLibraries/ClangSharp.Pathogen that referenced this issue Jun 9, 2022
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed.
* ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See MochiLibraries/Biohazrd#241 (comment))
* Fixed minor race condition in LibClangSharpResolver found while testing these changes.
PathogenDavid added a commit to MochiLibraries/ClangSharp.Pathogen that referenced this issue Jun 10, 2022
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed.
* ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See MochiLibraries/Biohazrd#241 (comment))
* Fixed minor race condition in LibClangSharpResolver found while testing these changes.
PathogenDavid added a commit that referenced this issue Jun 10, 2022
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed.
* ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See #241 (comment))
* Clang 14 introduced a new "using" type class, and support for it was added to TypeReductionTransformation.
PathogenDavid added a commit that referenced this issue Jun 10, 2022
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed.
* ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See #241 (comment))
* Clang 14 introduced a new "using" type class, and support for it was added to TypeReductionTransformation.

Fixes #241
PathogenDavid added a commit that referenced this issue Jun 10, 2022
* ClangSharp has joined the .NET Foundation since we last updated. In the process its license and copyright notice changed.
* ClangSharp no longer supports .NET 5, as such we no longer support .NET 5. (See #241 (comment))
* Clang 14 introduced a new "using" type class, and support for it was added to TypeReductionTransformation.

Fixes #241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Translation Issues concerning the translation from libclang into Biohazrd
Projects
None yet
Development

No branches or pull requests

1 participant