Skip to content

Conversation

@GRAnimated
Copy link
Contributor

The Switch uses Clang for compiling, but makes some modifications to the STL that we need to replicate to match some code.

Instead of shipping a custom modified zip of clang (from a slower mirror than LLVM), and having to update the zip when we make any new patches, this .diff system should let us add new patches without having to update the compilers repository.

These changes are required to compile/match some scratches on decomp.me.

@mkst
Copy link
Collaborator

mkst commented Jul 29, 2025

Very cool, thanks for the PR. Is 4.0.1 the only version with patches?

@GRAnimated
Copy link
Contributor Author

It's the only version that we've discovered changes for. Existing projects using other Clang versions make minimal use of the STL so there may be patches required later on.

@mkst
Copy link
Collaborator

mkst commented Jul 29, 2025

Does it make sense to download the zip of the repo rather than git clone-ing?

@GRAnimated
Copy link
Contributor Author

That does make more sense, yep.

@GRAnimated
Copy link
Contributor Author

I updated the templates again so the workflow should (hopefully) pass. Sorry for all the commits, please squash them when merging!

@mkst
Copy link
Collaborator

mkst commented Jul 29, 2025

No worries, seems the actual patching is failing now though?

@GRAnimated
Copy link
Contributor Author

It should work if you rerun the workflow now, I had generated these patches in a different directory earlier so patch was expecting the wrong path.

@GRAnimated
Copy link
Contributor Author

Hopefully that should be the last fix. I tested it locally this time and it all works.

@mkst mkst merged commit 582fdf3 into decompme:main Jul 31, 2025
7 checks passed
@GRAnimated GRAnimated deleted the clang-patches branch August 1, 2025 23:24
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