Skip to content

Commit

Permalink
fix: bring back LTO on Windows, it doesn't made any problems here, bu…
Browse files Browse the repository at this point in the history
…t lack of it generates too big executables

FossilOrigin-Name: 02607dda5345dcc00b9f1290d0fbc8fc53a57619cc92526f1bf6d1f0e2f08096
  • Loading branch information
thindil committed Jan 7, 2024
1 parent 2c86ad4 commit ac72d96
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions steamsky.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,19 @@ project steamsky is
"-gnaty3aAbCdefhIklnOprSux",
"-gnatwe");
when "release" =>
for Default_Switches ("ada") use ("-O2",
"-ffunction-sections",
"-fdata-sections",
"-s");
case OS is
when "Windows" =>
for Default_Switches ("ada") use ("-O2",
"-ffunction-sections",
"-fdata-sections",
"-s",
"-flto");
when "Unix" =>
for Default_Switches ("ada") use ("-O2",
"-ffunction-sections",
"-fdata-sections",
"-s");
end case;
when "analyze" =>
for Default_Switches ("ada") use ("-pg",
"-fprofile-arcs",
Expand All @@ -70,7 +79,7 @@ project steamsky is
case OS is
when "Windows" =>
for Default_Switches ("ada") use Release_Switches &
"-mwindows";
("-mwindows", "-flto");
when "Unix" =>
for Default_Switches ("ada") use Release_Switches &
"-Wl,-rpath,$ORIGIN/libs";
Expand Down

0 comments on commit ac72d96

Please sign in to comment.