experimental llvm-mingw support for dxvk? #2185

Closed
opened 2022-05-13 18:10:39 +02:00 by stefson · 8 comments

hey there,

I just learned of a project called llvm-mingw, which bootstraps a mingw compiler with llvm/clang/lld as its toolchain.

Its hosted at https://github.com/mstorsjo/llvm-mingw ; right now it needs a small patch from this issue https://github.com/mstorsjo/llvm-mingw/issues/277 to compile.

Do you think its possible to bend the dxvk config files a bit to accept CC=x86_64-w64-mingw32-clang?

I tried to patch build-win64.txt with the correct compiler values, to no avail.

hey there, I just learned of a project called llvm-mingw, which bootstraps a mingw compiler with llvm/clang/lld as its toolchain. Its hosted at https://github.com/mstorsjo/llvm-mingw ; right now it needs a small patch from this issue https://github.com/mstorsjo/llvm-mingw/issues/277 to compile. Do you think its possible to bend the dxvk config files a bit to accept CC=x86_64-w64-mingw32-clang? I tried to patch build-win64.txt with the correct compiler values, to no avail.
Owner

My ebuild checks if the toolchain is correctly installed in pkg_pretend(). It assumes that crossdev was used to compile it, so it would have to be rewritten to support llvm-mingw. I don't want to support that, because it is complicated enough at it is, but I could add a USE-flag to skip the checks? Or you could copy the ebuild to your local overlay and remove pkg_pretend().

My ebuild checks if the toolchain is correctly installed in [pkg_pretend()](https://schlomp.space/tastytea/overlay/src/branch/master/app-emulation/dxvk/dxvk-1.10.1.ebuild#L49-L73). It assumes that crossdev was used to compile it, so it would have to be rewritten to support llvm-mingw. I don't want to support that, because it is complicated enough at it is, but I could add a USE-flag to skip the checks? Or you could copy the ebuild to your local overlay and remove pkg_pretend().
Author

So I will have to remove the entire src_prepare section to skip the compiler checks, and also patch build-win-64.txt, as per line 121 its the source of the meson cross file, right?

So I will have to remove the entire src_prepare section to skip the compiler checks, and also patch build-win-64.txt, as per line 121 its the source of the meson cross file, right?
Owner

I've added the USE-flag skip-toolchain-check now, which skips the checks. So you only have to patch build-win-64.txt (and build-win-32.txt if you use 32 bit) in /etc/portage/patches.

I've added the USE-flag `skip-toolchain-check` now, which skips the checks. So you only have to patch build-win-64.txt (and build-win-32.txt if you use 32 bit) in [/etc/portage/patches](https://wiki.gentoo.org/wiki//etc/portage/patches).
Author

yes, that looks promising:

Build type: cross build
Project name: dxvk
Project version: v1.10.1

../dxvk-1.10.1/meson.build:1:0: ERROR: Unknown compiler(s): [['x86_64-w64-mingw32-clang']]
The following exception(s) were encountered:
Running "x86_64-w64-mingw32-clang --version" gave "[Errno 2] No such file or directory: 'x86_64-w64-mingw32-clang'"

I haven't yet installed the mingw32-clang properly, so its an expected fail.

By the way, your custom patch may need a litte update?

DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section.
yes, that looks promising: ``` Build type: cross build Project name: dxvk Project version: v1.10.1 ../dxvk-1.10.1/meson.build:1:0: ERROR: Unknown compiler(s): [['x86_64-w64-mingw32-clang']] The following exception(s) were encountered: Running "x86_64-w64-mingw32-clang --version" gave "[Errno 2] No such file or directory: 'x86_64-w64-mingw32-clang'" ``` I haven't yet installed the mingw32-clang properly, so its an expected fail. By the way, your custom patch may need a litte update? ``` DEPRECATION: c_args in the [properties] section of the machine file is deprecated, use the [built-in options] section. DEPRECATION: cpp_args in the [properties] section of the machine file is deprecated, use the [built-in options] section. DEPRECATION: c_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section. DEPRECATION: cpp_link_args in the [properties] section of the machine file is deprecated, use the [built-in options] section. ```
Owner

Thanks, I'll fix it in the next version.

Thanks, I'll fix it in the next version.
Owner

app-emulation/dxvk is in the main repo now and masked for removal here.

app-emulation/dxvk is in the main repo now and masked for removal here.
Author

thanks for the bumby ride with this :-)

do you think theres anything from your ebuilds worth to upstream towards the gentoo tree?

thanks for the bumby ride with this :-) do you think theres anything from your ebuilds worth to upstream towards the gentoo tree?
Owner

It seems like it does everything my ebuilds did. There's even a MINGW_BYPASS variable you can override to use llvm-mingw: https://cgit.gentoo.org/repo/gentoo.git/tree/app-emulation/dxvk/dxvk-1.10.2.ebuild#n35.

It seems like it does everything my ebuilds did. There's even a `MINGW_BYPASS` variable you can override to use llvm-mingw: <https://cgit.gentoo.org/repo/gentoo.git/tree/app-emulation/dxvk/dxvk-1.10.2.ebuild#n35>.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tastytea/overlay#2185
No description provided.