Skip to content

Commit

Permalink
build: Detect linker with cc.has_link_argument('/LTCG')
Browse files Browse the repository at this point in the history
Clang-CL setups do not work with Meson 1.3 but they are already broken,
so let's wait.

Reference: mesonbuild/meson#13998
Reference: mesonbuild/meson#14012
  • Loading branch information
lhmouse committed Dec 16, 2024
1 parent 55d0a45 commit d76d0cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ mcfgthread_version_o = import('windows').compile_resources(
args: [ '-I.', '-c65001' ],
depend_files: [ 'mcfgthread/version.h.in', 'mcfgthread/version.manifest' ])

if cc.get_linker_id() in [ 'link', 'lld-link' ]
if cc.has_link_argument('/LTCG')
lib_mcfgthread_dll_link_args = [
'-Wl,-nodefaultlib', '-Wl,-dynamicbase', '-Wl,-opt:ref', '-Wl,-opt:icf',
'-Xlinker', '-subsystem:windows,6.1', '-Wl,-kill-at' ]
Expand Down

0 comments on commit d76d0cc

Please sign in to comment.