| 1 |
------------------------------------------------------------------------------ |
| 2 |
-- -- |
| 3 |
-- GNAT COMPILER COMPONENTS -- |
| 4 |
-- -- |
| 5 |
-- I N D E P S W -- |
| 6 |
-- -- |
| 7 |
-- B o d y -- |
| 8 |
-- (GNU version) -- |
| 9 |
-- -- |
| 10 |
-- Copyright (C) 2009-2025, Free Software Foundation, Inc. -- |
| 11 |
-- -- |
| 12 |
-- GNAT is free software; you can redistribute it and/or modify it under -- |
| 13 |
-- terms of the GNU General Public License as published by the Free Soft- -- |
| 14 |
-- ware Foundation; either version 3, or (at your option) any later ver- -- |
| 15 |
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
| 16 |
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- |
| 17 |
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- |
| 18 |
-- for more details. You should have received a copy of the GNU General -- |
| 19 |
-- Public License distributed with GNAT; see file COPYING3. If not, go to -- |
| 20 |
-- http://www.gnu.org/licenses for a complete copy of the license. -- |
| 21 |
-- -- |
| 22 |
-- GNAT was originally developed by the GNAT team at New York University. -- |
| 23 |
-- Extensive contributions were provided by Ada Core Technologies Inc. -- |
| 24 |
-- -- |
| 25 |
------------------------------------------------------------------------------ |
| 26 |
|
| 27 |
-- This is the GNU ld version |
| 28 |
|
| 29 |
package body Indepsw is |
| 30 |
|
| 31 |
Map_Switch : aliased constant String := "-Wl,-Map,"; |
| 32 |
|
| 33 |
------------- |
| 34 |
-- Convert -- |
| 35 |
------------- |
| 36 |
|
| 37 |
procedure Convert |
| 38 |
(Switch : Switch_Kind; |
| 39 |
Argument : String; |
| 40 |
To : out String_List_Access) |
| 41 |
is |
| 42 |
begin |
| 43 |
case Switch is |
| 44 |
when Map_File => |
| 45 |
To := new Argument_List'(1 => new String'(Map_Switch & Argument)); |
| 46 |
end case; |
| 47 |
end Convert; |
| 48 |
|
| 49 |
------------------ |
| 50 |
-- Is_Supported -- |
| 51 |
------------------ |
| 52 |
|
| 53 |
function Is_Supported (Switch : Switch_Kind) return Boolean is |
| 54 |
begin |
| 55 |
case Switch is |
| 56 |
when Map_File => |
| 57 |
return True; |
| 58 |
end case; |
| 59 |
end Is_Supported; |
| 60 |
|
| 61 |
end Indepsw; |