Skip to content

Commit

Permalink
meson: Implemented a guard for LTO on macOS w/ GCC as this is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonmux committed Sep 29, 2023
1 parent d77249b commit 8cdead5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# SPDX-FileContributor: Written by Rachel Mant <git@dragonmux.network>
cxx = meson.get_compiler('cpp')

if get_option('b_lto') and host_machine.system() == 'darwin' and cxx.get_id() == 'gcc'
error('GCC on macOS does not correctly implement support for LTO, please pass `-Db_lto=false` to Meson')
endif

if cxx.get_id() == 'msvc' and cxx.version().version_compare('<19.37')
error('Your compiler is broken, please upgrade to at least MSVC 2022 release 17.7 to build bmpflash with MSVC.')
endif
Expand Down

0 comments on commit 8cdead5

Please sign in to comment.