summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ghdldrv/ghdllocal.adb28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index b79a06f..0072b37 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -596,6 +596,7 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
+ -- '-d' is for compatibility.
return Name = "-d" or else Name = "--dir";
end Decode_Command;
@@ -603,31 +604,22 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return "-d or --dir Disp contents of the work library";
+ return "--dir [LIBs] Disp contents of the libraries";
end Get_Short_Help;
procedure Perform_Action (Cmd : in out Command_Dir; Args : Argument_List)
is
pragma Unreferenced (Cmd);
begin
- if Args'Length /= 0 then
- Error ("command '-d' does not accept any argument");
- raise Option_Error;
- end if;
-
- Flags.Bootstrap := True;
- -- Load word library.
- Libraries.Load_Std_Library;
- Libraries.Load_Work_Library;
-
- Disp_Library (Std_Names.Name_Work);
+ Setup_Libraries (True);
--- else
--- for L in Libs'Range loop
--- Id := Get_Identifier (Libs (L).all);
--- Disp_Library (Id);
--- end loop;
--- end if;
+ if Args'Length = 0 then
+ Disp_Library (Std_Names.Name_Work);
+ else
+ for I in Args'Range loop
+ Disp_Library (Name_Table.Get_Identifier (Args (I).all));
+ end loop;
+ end if;
end Perform_Action;
-- Command Find.