From ef16a99c08ac8201c8264b9dce44ffab4c596af8 Mon Sep 17 00:00:00 2001 From: Sven/Sarah Barth Date: Fri, 11 Oct 2024 16:11:00 +0200 Subject: [PATCH] * partial fix #40934: don't remove the DEF file if cs_link_deffile is set (thus if the user explicitly wants the file) --- compiler/gendef.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/gendef.pas b/compiler/gendef.pas index 855a95c41d..b9883c1bd0 100644 --- a/compiler/gendef.pas +++ b/compiler/gendef.pas @@ -70,7 +70,7 @@ end; destructor tdeffile.destroy; begin if WrittenOnDisk and - not(cs_link_nolink in current_settings.globalswitches) then + ([cs_link_nolink,cs_link_deffile]*current_settings.globalswitches=[]) then DeleteFile(FName); importlist.Free; exportlist.Free;