[build] Use --file-alignment=4096 with MinGW

Avoids a copy in the Wine loader as well as enables debug symbols to work in perf.
This commit is contained in:
Joshua Ashton 2021-03-03 17:42:30 +00:00 committed by Philip Rebohle
parent 1589f516c9
commit aae889ccd9
1 changed files with 8 additions and 2 deletions

View File

@ -26,10 +26,16 @@ if dxvk_compiler.get_id() == 'clang'
endif
endif
if get_option('build_id') and dxvk_compiler.get_id() != 'msvc'
if dxvk_compiler.has_link_argument('-Wl,--build-id')
if dxvk_compiler.get_id() != 'msvc'
if get_option('build_id') and dxvk_compiler.has_link_argument('-Wl,--build-id')
add_global_link_arguments('-Wl,--build-id', language: 'cpp')
endif
# We need to set the section alignment for debug symbols to
# work properly as well as avoiding a memcpy from the Wine loader.
if dxvk_compiler.has_link_argument('-Wl,--file-alignment=4096')
add_global_link_arguments('-Wl,--file-alignment=4096', language: 'cpp')
endif
endif
dxvk_include_path = include_directories('./include')