Skip to content

Commit

Permalink
Test: fix integration Makefile for cross targets
Browse files Browse the repository at this point in the history
This includes unifying the handling of --implicit-with to avoid
duplicate switches, and forcing the rebuild of all units in binary
traces to ensure the proper SCOs are generated each time.
  • Loading branch information
leocreuse committed Apr 19, 2024
1 parent ff9e580 commit fb7e79a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/test-harness.adb
Original file line number Diff line number Diff line change
Expand Up @@ -4108,8 +4108,7 @@ package body Test.Harness is
(0,
ASCII.HT
& "$(GPRBUILD) $(BUILDERFLAGS) -P$*.gpr $(GPRFLAGS)"
& " -o $(notdir $*)$(EXE_EXT) --src-subdirs=gnatcov-instr "
& "--implicit-with=gnatcov_rts");
& " -o $(notdir $*)$(EXE_EXT) --src-subdirs=gnatcov-instr");
Put_New_Line;
Put_New_Line;

Expand Down Expand Up @@ -4231,12 +4230,10 @@ package body Test.Harness is
Put_New_Line;
end if;

if not Target_Native then
S_Put (0, "inst-coverage: BUILDERFLAGS+="
S_Put (0, "inst-coverage: BUILDERFLAGS+="
& "--implicit-with=$(if $(GNATCOV_RTS),$(GNATCOV_RTS),"
& "gnatcov_rts.gpr)");
Put_New_Line;
end if;
Put_New_Line;
S_Put (0, "inst-coverage: gnatcov-consolidate");
Put_New_Line;
Put_New_Line;
Expand Down

0 comments on commit fb7e79a

Please sign in to comment.