Improve support for clang-cl on windows

* Better support for clang-cl on windows
* Fix runtime error caused by removing unwind tables
This commit is contained in:
Peter Vullings 2022-05-14 03:17:30 +12:00 committed by GitHub
parent 75c1314ab0
commit 47075bb3e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,19 @@
compiler_flags = ['-DTVG_BUILD'] compiler_flags = ['-DTVG_BUILD']
override_options = []
cc = meson.get_compiler('cpp') cc = meson.get_compiler('cpp')
if (cc.get_id() != 'msvc') if (cc.get_id() == 'clang-cl')
if simd_type == 'avx'
compiler_flags += ['/clang:-mavx']
endif
if simd_type == 'neon'
compiler_flags += ['/clang:-mfpu=neon']
endif
if get_option('b_sanitize') == 'none'
override_options += ['cpp_eh=none','cpp_rtti=false']
compiler_flags += ['/clang:-fno-math-errno',
'/clang:-Woverloaded-virtual', '/clang:-Wno-unused-value', '-Wno-deprecated-declarations']
endif
elif (cc.get_id() != 'msvc')
if simd_type == 'avx' if simd_type == 'avx'
compiler_flags += ['-mavx'] compiler_flags += ['-mavx']
endif endif
@ -35,6 +47,7 @@ thorvg_lib = library(
install : true, install : true,
cpp_args : compiler_flags, cpp_args : compiler_flags,
gnu_symbol_visibility : 'hidden', gnu_symbol_visibility : 'hidden',
override_options : override_options
) )
thorvg_dep = declare_dependency( thorvg_dep = declare_dependency(