mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
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:
parent
75c1314ab0
commit
47075bb3e6
1 changed files with 15 additions and 2 deletions
|
@ -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(
|
||||||
|
|
Loading…
Add table
Reference in a new issue