From 849a25e02cfb359e3d9313060156b0643495548b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 10 Apr 2021 11:07:13 +0200 Subject: ghdldrv,configure: allow LIB.UNIT name for -e/-r commands. Fix #1718 --- src/ghdldrv/ghdlcomp.adb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/ghdldrv/ghdlcomp.adb') diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index c62348752..c778ecfb5 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -327,14 +327,15 @@ package body Ghdlcomp is Opt_Arg : out Natural; Config : out Iir) is + Lib_Id : Name_Id; Prim_Id : Name_Id; Sec_Id : Name_Id; begin - Extract_Elab_Unit (Cmd_Name, Args, Opt_Arg, Prim_Id, Sec_Id); + Extract_Elab_Unit (Cmd_Name, Args, Opt_Arg, Lib_Id, Prim_Id, Sec_Id); Flags.Flag_Elaborate := True; - Config := Vhdl.Configuration.Configure (Prim_Id, Sec_Id); + Config := Vhdl.Configuration.Configure (Lib_Id, Prim_Id, Sec_Id); if Config = Null_Iir or else Errorout.Nbr_Errors > 0 then @@ -730,6 +731,7 @@ package body Ghdlcomp is is pragma Unreferenced (Cmd); + Lib_Id : Name_Id; Prim_Id : Name_Id; Sec_Id : Name_Id; Files_List : Iir_List; @@ -741,13 +743,13 @@ package body Ghdlcomp is Unit : Iir_Design_Unit; Lib : Iir_Library_Declaration; begin - Extract_Elab_Unit ("-m", Args, Next_Arg, Prim_Id, Sec_Id); + Extract_Elab_Unit ("-m", Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); if not Setup_Libraries (True) then return; end if; -- Create list of files. - Files_List := Build_Dependence (Prim_Id, Sec_Id); + Files_List := Build_Dependence (Lib_Id, Prim_Id, Sec_Id); -- Unmark all libraries. Lib := Libraries.Std_Library; @@ -874,6 +876,7 @@ package body Ghdlcomp is use Name_Table; HT : constant Character := ASCII.HT; + Lib_Id : Name_Id; Prim_Id : Name_Id; Sec_Id : Name_Id; Files_List : Iir_List; @@ -885,11 +888,12 @@ package body Ghdlcomp is Next_Arg : Natural; begin - Extract_Elab_Unit ("--gen-makefile", Args, Next_Arg, Prim_Id, Sec_Id); + Extract_Elab_Unit + ("--gen-makefile", Args, Next_Arg, Lib_Id, Prim_Id, Sec_Id); if not Setup_Libraries (True) then return; end if; - Files_List := Build_Dependence (Prim_Id, Sec_Id); + Files_List := Build_Dependence (Lib_Id, Prim_Id, Sec_Id); Ghdllocal.Gen_Makefile_Disp_Header; -- cgit v1.2.3