[builds/windows] Revise MSVC linking optimizations. * builds/windows/vc2010/freetype.vcxproj: Optimize DLL linking only. * builds/windows/visualc/freetype.dsp: Ditto. * builds/windows/visualc/freetype.vcproj: Ditto.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
diff --git a/builds/windows/vc2010/freetype.vcxproj b/builds/windows/vc2010/freetype.vcxproj
index fd25ac5..2a79266 100644
--- a/builds/windows/vc2010/freetype.vcxproj
+++ b/builds/windows/vc2010/freetype.vcxproj
@@ -172,12 +172,10 @@
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Lib>
<TargetMachine>MachineARM64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
<PreBuildEvent>
<Command>call $(SolutionDir)script.bat</Command>
</PreBuildEvent>
@@ -204,12 +202,10 @@
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Lib>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
<PreBuildEvent>
<Command>call $(SolutionDir)script.bat</Command>
</PreBuildEvent>
@@ -236,12 +232,10 @@
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Lib>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
<PreBuildEvent>
<Command>call $(SolutionDir)script.bat</Command>
</PreBuildEvent>
@@ -268,12 +262,10 @@
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Lib>
<TargetMachine>MachineARM64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
<PreBuildEvent>
<Command>call $(SolutionDir)script.bat</Command>
</PreBuildEvent>
@@ -300,12 +292,10 @@
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Lib>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
<PreBuildEvent>
<Command>call $(SolutionDir)script.bat</Command>
</PreBuildEvent>
@@ -333,13 +323,10 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
@@ -364,13 +351,10 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineARM64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
@@ -394,13 +378,10 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|Win32'">
<ClCompile>
@@ -423,15 +404,10 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|ARM64'">
<ClCompile>
@@ -454,15 +430,10 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineARM64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Static|x64'">
<ClCompile>
@@ -484,15 +455,10 @@
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- </Link>
- <Lib>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
<AdditionalLibraryDirectories>$(UserLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(UserDependencies);%(AdditionalDependencies)</AdditionalDependencies>
- </Lib>
+ </Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\autofit\autofit.c" />
diff --git a/builds/windows/visualc/freetype.dsp b/builds/windows/visualc/freetype.dsp
index 028dd7b..540f5b9 100644
--- a/builds/windows/visualc/freetype.dsp
+++ b/builds/windows/visualc/freetype.dsp
@@ -58,7 +58,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"$(OutDir)\freetype.dll"
+# ADD LINK32 /nologo /dll /machine:I386 /opt:REF,ICF /out:"$(OutDir)\freetype.dll"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
diff --git a/builds/windows/visualc/freetype.vcproj b/builds/windows/visualc/freetype.vcproj
index ecf0ec9..4cbb6b9 100644
--- a/builds/windows/visualc/freetype.vcproj
+++ b/builds/windows/visualc/freetype.vcproj
@@ -66,6 +66,8 @@
/>
<Tool
Name="VCLinkerTool"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
/>
<Tool
Name="VCALinkTool"