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 b6ad6f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# SPDX-FileContributor: Written by Rachel Mant <[email protected]>
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\n'
'-> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111635 for details'
)
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 b6ad6f5

Please sign in to comment.