aboutsummaryrefslogtreecommitdiffstats
path: root/src/ghdldrv/ghdlcomp.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-04-10 11:07:13 +0200
committerTristan Gingold <tgingold@free.fr>2021-04-10 18:14:09 +0200
commit849a25e02cfb359e3d9313060156b0643495548b (patch)
tree3d84c0107a7a7beccc780a352da1393c2cdd633f /src/ghdldrv/ghdlcomp.adb
parent6b4051a0b29effd4210d99609dcbd0eceff8111f (diff)
downloadghdl-849a25e02cfb359e3d9313060156b0643495548b.tar.gz
ghdl-849a25e02cfb359e3d9313060156b0643495548b.tar.bz2
ghdl-849a25e02cfb359e3d9313060156b0643495548b.zip
ghdldrv,configure: allow LIB.UNIT name for -e/-r commands. Fix #1718
Diffstat (limited to 'src/ghdldrv/ghdlcomp.adb')
-rw-r--r--src/ghdldrv/ghdlcomp.adb16
1 files changed, 10 insertions, 6 deletions
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;