Skip to content

Commit

Permalink
[build] Check if --add-stdcall-alias and --enable-stdcall-fixup is su…
Browse files Browse the repository at this point in the history
…pported before using it.

lld-link linker does not support nor need it.
  • Loading branch information
cjacek authored and doitsujin committed Aug 26, 2019
1 parent 1981140 commit e7b7192
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build-win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ strip = 'i686-w64-mingw32-strip'
c_args=['-msse', '-msse2']
cpp_args=['-msse', '-msse2']
c_link_args = ['-static', '-static-libgcc']
cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++', '-Wl,--add-stdcall-alias,--enable-stdcall-fixup']
cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++']
needs_exe_wrapper = true

[host_machine]
Expand Down
10 changes: 9 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project('dxvk', ['c', 'cpp'], version : 'v1.3.2', meson_version : '>= 0.43')
project('dxvk', ['c', 'cpp'], version : 'v1.3.2', meson_version : '>= 0.46')

cpu_family = target_machine.cpu_family()

Expand Down Expand Up @@ -50,6 +50,14 @@ else
else
wrc = cpu_family == 'x86_64' ? find_program('x86_64-w64-mingw32-windres') : find_program('i686-w64-mingw32-windres')
endif
if cpu_family == 'x86'
if dxvk_compiler.has_link_argument('-Wl,--add-stdcall-alias')
add_global_link_arguments('-Wl,--add-stdcall-alias', language: 'cpp')
endif
if dxvk_compiler.has_link_argument('-Wl,--enable-stdcall-fixup')
add_global_link_arguments('-Wl,--enable-stdcall-fixup', language: 'cpp')
endif
endif

lib_vulkan = dxvk_compiler.find_library('vulkan-1', dirs : dxvk_library_path)
lib_d3d11 = dxvk_compiler.find_library('d3d11')
Expand Down

2 comments on commit e7b7192

@SveSop
Copy link
Contributor

@SveSop SveSop commented on e7b7192 Aug 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requirements:
Meson build system (at least version 0.43)

from https://github.com/doitsujin/dxvk/blob/master/README.md

Is that still true with the line project('dxvk', ['c', 'cpp'], version : 'v1.3.2', meson_version : '>= 0.46') ?

Also, if meson > 0.46, Ubuntu Bionic might need some PPA to be able to build.
https://packages.ubuntu.com/bionic-updates/meson

Will test when i get home.

@SveSop
Copy link
Contributor

@SveSop SveSop commented on e7b7192 Aug 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put up a Meson backport on my PPA here: https://launchpad.net/~cybermax-dexter/+archive/ubuntu/meson-backport

Version 0.49 for Ubuntu Bionic (18.04 LTS).

Please sign in to comment.