@@ -5908,7 +5908,7 @@
-- are not supposed to change.
Osint.Source_File_Data (Cache => True);
@@ -5931,17 +5931,6 @@
("nothing to do for a main project that is externally built");
- -- Get the target parameters, which are only needed for a couple of
- -- cases in gnatmake. Protect against an exception, such as the case of
- -- system.ads missing from the library, and fail gracefully.
- when Unrecoverable_Error =>
- Make_Failed ("*** make failed.");
-- Special processing for VM targets
if Targparm.VM_Target /= No_VM then
@@ -6116,7 +6105,28 @@
Compute_Builder => Is_First_Main,
Current_Work_Dir => Current_Work_Dir.all);
- Is_First_Main := False;
+ if Is_First_Main then
+ -- Put the default source dirs in the source path only now,
+ -- so that we take the correct ones in the case when --RTS= is
+ -- specified in the Builder switches.
+ -- Get the target parameters, which are only needed for a couple
+ -- of cases in gnatmake. Protect against an exception, such as the
+ -- case of system.ads missing from the library, and fail
+ -- gracefully.
+ when Unrecoverable_Error =>
+ Make_Failed ("*** make failed.");
+ Is_First_Main := False;
+ end if;
Executable_Obsolete := False;