From aae889ccd9411eb457ad901c7f6a8d59ee092e3b Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 3 Mar 2021 17:42:30 +0000 Subject: [PATCH] [build] Use --file-alignment=4096 with MinGW Avoids a copy in the Wine loader as well as enables debug symbols to work in perf. --- meson.build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 149147607..70de1c400 100644 --- a/meson.build +++ b/meson.build @@ -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')