From 0aac4efd094b6b7ec0254f2bc4c2b994ed35c417 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 13 Apr 2020 17:02:45 +0200 Subject: synth: also try to open files (during synthesis) relative to current unit. Fix #1190 --- src/synth/synth-insts.adb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/synth/synth-insts.adb') diff --git a/src/synth/synth-insts.adb b/src/synth/synth-insts.adb index f022ac71d..2013d4939 100644 --- a/src/synth/synth-insts.adb +++ b/src/synth/synth-insts.adb @@ -52,6 +52,7 @@ with Synth.Decls; use Synth.Decls; with Synth.Expr; use Synth.Expr; with Synth.Source; use Synth.Source; with Synth.Debugger; +with Synth.Files_Operations; package body Synth.Insts is Root_Instance : Synth_Instance_Acc; @@ -1464,6 +1465,10 @@ package body Synth.Insts is return; end if; + -- Save the current architecture, so that files can be open using a + -- path relative to the architecture filename. + Synth.Files_Operations.Set_Design_Unit (Arch); + Synth_Dependencies (Root_Instance, Get_Design_Unit (Arch)); Set_Instance_Module (Syn_Inst, Inst.M); -- cgit v1.2.3