Compare commits

...

2 Commits

Author SHA1 Message Date
Joshua Ashton b9078ff7a8
build: Use --file-alignment=4096 with MinGW
Avoids a copy in the Wine loader as well as enables debug symbols to work in perf.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-03 17:59:51 +00:00
Joshua Ashton 4fd0740b47
build: Rename vkd3d_msvc and vkd3d_clang
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-03 17:54:28 +00:00
3 changed files with 13 additions and 5 deletions

View File

@ -7,7 +7,7 @@ d3d12_lib = shared_library('d3d12', d3d12_src,
dependencies : [ vkd3d_dep, lib_dxgi ],
include_directories : vkd3d_private_includes,
install : true,
objects : not vkd3d_msvc ? 'd3d12.def' : [],
objects : not vkd3d_is_msvc ? 'd3d12.def' : [],
vs_module_defs : 'd3d12.def',
override_options : [ 'c_std='+vkd3d_c_std ])

View File

@ -6,7 +6,7 @@ vkd3d_utils_lib = shared_library('vkd3d-proton-utils', vkd3d_utils_src,
dependencies : vkd3d_dep,
include_directories : vkd3d_private_includes,
install : true,
objects : not vkd3d_msvc and vkd3d_platform == 'windows'
objects : not vkd3d_is_msvc and vkd3d_platform == 'windows'
? 'vkd3d-proton-utils.def'
: [],
vs_module_defs : 'vkd3d-proton-utils.def',

View File

@ -5,8 +5,8 @@ project('vkd3d-proton', ['c'], version : '2.2', meson_version : '>= 0.49', defau
cpu_family = target_machine.cpu_family()
vkd3d_compiler = meson.get_compiler('c')
vkd3d_msvc = vkd3d_compiler.get_id() == 'msvc'
vkd3d_clang = vkd3d_compiler.get_id() == 'clang'
vkd3d_is_msvc = vkd3d_compiler.get_id() == 'msvc'
vkd3d_is_clang = vkd3d_compiler.get_id() == 'clang'
vkd3d_c_std = 'c11'
vkd3d_platform = target_machine.system()
@ -119,12 +119,20 @@ if cpu_family == 'x86'
# Need to link against libatomic for 64-bit atomic emulation on x86
# when using clang.
if vkd3d_clang
if vkd3d_is_clang
lib_atomic = vkd3d_compiler.find_library('atomic')
vkd3d_extra_libs += lib_atomic
endif
endif
if not vkd3d_is_msvc
# We need to set the section alignment for debug symbols to
# work properly as well as avoiding a memcpy from the Wine loader.
if vkd3d_compiler.has_link_argument('-Wl,--file-alignment=4096')
add_global_link_arguments('-Wl,--file-alignment=4096', language : [ 'c', 'cpp' ])
endif
endif
vkd3d_build = vcs_tag(
command : ['git', 'describe', '--always', '--exclude=*', '--abbrev=15', '--dirty=0'],
input : 'vkd3d_build.h.in',