From 6c7408cd54e225684e5305a0c9d5be0809afff48 Mon Sep 17 00:00:00 2001 From: Andrei Horodniceanu Date: Mon, 29 Apr 2024 08:40:20 +0300 Subject: [PATCH] meson.build: add `-allinst` when compiling with dmd or gdc, #2210 This is needed to work around a bug in dmd regarding template emissions. Bug: https://github.com/gnunn1/tilix/issues/2210 Bug: https://issues.dlang.org/show_bug.cgi?id=20668 Signed-off-by: Andrei Horodniceanu --- meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 73f3ebe8..8f22061e 100644 --- a/meson.build +++ b/meson.build @@ -9,8 +9,13 @@ compiler = meson.get_compiler('d') if compiler.get_id() == 'llvm' d_extra_args = ['-vcolumns'] d_link_args = [] -else - d_extra_args = [] +elif compiler.get_id() == 'dmd' + # Workaround for https://issues.dlang.org/show_bug.cgi?id=20668 + d_extra_args = ['-allinst'] + d_link_args = [] +elif compiler.get_id() == 'gcc' + # Workaround for https://issues.dlang.org/show_bug.cgi?id=20668 + d_extra_args = ['-fall-instantiations'] d_link_args = [] endif