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

libobjc2: Add clang64 support #20024

Merged
merged 6 commits into from
Feb 13, 2024
Merged

Conversation

qmfrederik
Copy link
Contributor

Upstream libobjc2 now has clang64 support (via gnustep/libobjc2#276).

Cherry-pick that commit and add clang64 to the build matrix for libobjc2. This cherry-picked commit also fixes the ".dll.a" suffix for library objects, so we no longer need to manually rename that file.

@MehdiChinoune
Copy link
Collaborator

The is a mistake, the import library should be named libobjc2.dll.a while the dynamic libraru objc2.dll

in gnustep/libobjc2#276, it should be

if (MINGW)
	set(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a")
	set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
	set(CMAKE_LINK_LIBRARY_SUFFIX "")
	set(CMAKE_SHARED_LIBRARY_PREFIX "")
	set(CMAKE_OBJCXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif ()

qmfrederik added a commit to qmfrederik/libobjc2 that referenced this pull request Feb 12, 2024
- Use "lib{library}.dll.a" for import libraries
- Use "{library.dll}" for shared libraries

See msys2/MINGW-packages#20024 (comment)
@qmfrederik
Copy link
Contributor Author

Thanks @MehdiChinoune , I submitted a patch for upstream and included it in this PR.

With this, we now have:

/mingw64/lib/libobjc.dll.a
/mingw64/bin/objc.dll

Is this what you were expecting?

@MehdiChinoune
Copy link
Collaborator

@qmfrederik could you try cmake from #20028

qmfrederik added a commit to gnustep/libobjc2 that referenced this pull request Feb 13, 2024
We no longer need to manually set these suffixes/prefixes as CMake in MSYS2 now knows about Objective C.

See msys2/MINGW-packages#20028
See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9244
See msys2/MINGW-packages#20024 (comment)
@qmfrederik
Copy link
Contributor Author

@MehdiChinoune Thank you for all your help. The libobjc2 patch got merged and I updated PKGBUILD to use the merged version of that patch. The installed files are now:

  -- Installing: C:/_/B/pkg/mingw-w64-clang-x86_64-libobjc2/clang64/lib/libobjc.dll.a
  -- Installing: C:/_/B/pkg/mingw-w64-clang-x86_64-libobjc2/clang64/bin/libobjc-4.6.dll

which I believe is what we want.

@MehdiChinoune
Copy link
Collaborator

The name of dll was changed, so I think all reverse-dependencies should be rebuilt.

qmfrederik and others added 6 commits February 13, 2024 14:10
Upstream libobjc2 now has clang64 support (via
gnustep/libobjc2#276).

Cherry-pick that commit and add clang64 to the build matrix for
libobjc2.  This cherry-picked commit also fixes the ".dll.a" suffix for
library objects.
@MehdiChinoune MehdiChinoune merged commit 168f390 into msys2:master Feb 13, 2024
8 checks passed
qmfrederik added a commit to gnustep/libobjc2 that referenced this pull request Mar 21, 2024
We no longer need to manually set these suffixes/prefixes as CMake in MSYS2 now knows about Objective C.

See msys2/MINGW-packages#20028
See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/9244
See msys2/MINGW-packages#20024 (comment)
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.

None yet

3 participants