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

Clang: Backport fixes for Objective-C on mingw #19767

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Conversation

qmfrederik
Copy link
Contributor

@qmfrederik qmfrederik commented Jan 15, 2024

This pull request:

Backports the following fixes for clang:

which support compiling Objective-C code on mingw using Clang.

Since these fixes are specific to mingw, I hope it's appropriate to backport them to this repository before they land in the next clang release.

Additionally, around the time this PR was being created, the llvm repository switched from a state where the first 14 characters of the commit hash were sufficient to uniquely identify a commit (e.g. f55e5434dce360) to a state where 15 characters were required (e.g. f55e5434dce360b).

For example, I was able to have llvm/llvm-project@10b78cc8cea65e7e77d227af4027963f39402724 return the following two fragments (note the difference in the index line).

diff --git a/llvm/test/tools/llvm-rc/preproc.test b/llvm/test/tools/llvm-rc/preproc.test
index f55e5434dce360..7a6d8b3db03662 100644
--- a/llvm/test/tools/llvm-rc/preproc.test
+++ b/llvm/test/tools/llvm-rc/preproc.test
@@ -1,3 +1,3 @@

vs.

diff --git a/llvm/test/tools/llvm-rc/preproc.test b/llvm/test/tools/llvm-rc/preproc.test
index f55e5434dce360b..7a6d8b3db036623 100644
--- a/llvm/test/tools/llvm-rc/preproc.test
+++ b/llvm/test/tools/llvm-rc/preproc.test
@@ -1,3 +1,3 @@

This caused the builds to fail intermittently, depending on which (cached) version of the patch was returned by GitHub (presumably because different front-end servers were being hit, with a different cached version).

As a result, I believe using https://github.com/llvm/llvm-project/commit/{commit-id}.patch together with sha256 checksums is unstable, as the representation of the patch can change, and I've added the commits themselves to the mingw-w64-clang directory.

@lazka
Copy link
Member

lazka commented Jan 16, 2024

thanks

@qmfrederik
Copy link
Contributor Author

Thanks, @lazka . Are you OK with this PR as is, or would you like me to make any changes? It's a bit noisy because the .patch files are now part of the repo, but I believe that's the right thing to do (especially for a very active repo such as llvm-project).

@lazka lazka merged commit 791ad3f into msys2:master Jan 22, 2024
8 checks passed
@lazka
Copy link
Member

lazka commented Jan 22, 2024

sounds reasonable, thanks!

@MehdiChinoune
Copy link
Collaborator

@qmfrederik I couldn't find any link for c65ae76326040369bcd3a85678ab76e402140036.patch, Is it your own patch?

@qmfrederik
Copy link
Contributor Author

@MehdiChinoune It's the equivalent of llvm/llvm-project#77797, which had merge conflicts.

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.

3 participants