From 080c7dd9329aa90d4d797f638bb34312487cd496 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 26 Sep 2016 20:39:27 +0200 Subject: Emit a better message for -Wl with mcode backend. --- src/ghdldrv/ghdlcomp.adb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index d496c148c..77aa4ebe7 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -426,6 +426,7 @@ package body Ghdlcomp is Arg : String; Res : out Option_Res) is + pragma Assert (Option'First = 1); begin if Option = "--expect-failure" then Flag_Expect_Failure := True; @@ -437,8 +438,10 @@ package body Ghdlcomp is -- Silently accepted. Res := Option_Arg; end if; - --elsif Option'Length >= 4 and then Option (1 .. 4) = "-Wl," then - -- Res := Option_Ok; + elsif Option'Length >= 4 + and then Option (1 .. 4) = "-Wl," then + Error_Msg_Option ("option -Wl is not available when ghdl " + & "is not configured with gcc or llvm"); else Decode_Option (Command_Lib (Cmd), Option, Arg, Res); end if; -- cgit v1.2.3