[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH xenvbd 2/2] Do more optimization in release builds and add /Qspectre flag
Spectre mitigations apparently only work on optimized code. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- vs2017/xencrsh/xencrsh.vcxproj | 11 ++++++++++- vs2017/xendisk/xendisk.vcxproj | 12 ++++++++++-- vs2017/xenvbd/xenvbd.vcxproj | 12 ++++++++++-- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/vs2017/xencrsh/xencrsh.vcxproj b/vs2017/xencrsh/xencrsh.vcxproj index e922682..baa6eb9 100644 --- a/vs2017/xencrsh/xencrsh.vcxproj +++ b/vs2017/xencrsh/xencrsh.vcxproj @@ -22,8 +22,9 @@ <ClCompile> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>__MODULE__="XENCRSH";POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4548;4711;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4548;4770;4711;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -34,6 +35,7 @@ <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <ModuleDefinitionFile>../../src/xencrsh/xencrsh.def</ModuleDefinitionFile> <AdditionalDependencies>$(DDK_LIB_PATH)/storport.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies)</AdditionalDependencies> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> @@ -46,6 +48,13 @@ <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>true</WholeProgramOptimization> + <AdditionalOptions>/Qspectre %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + </ItemDefinitionGroup> <ItemGroup> <FilesToPackage Include="$(TargetPath)" /> <FilesToPackage Include="$(OutDir)$(TargetName).pdb" /> diff --git a/vs2017/xendisk/xendisk.vcxproj b/vs2017/xendisk/xendisk.vcxproj index dfc9cc7..d9dc01c 100644 --- a/vs2017/xendisk/xendisk.vcxproj +++ b/vs2017/xendisk/xendisk.vcxproj @@ -23,8 +23,9 @@ <AdditionalIncludeDirectories>..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <BufferSecurityCheck>false</BufferSecurityCheck> <PreprocessorDefinitions>__MODULE__="XENDISK";POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4548;4711;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4548;4770;4711;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -34,7 +35,7 @@ <Link> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <EnableCOMDATFolding>false</EnableCOMDATFolding> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> @@ -47,6 +48,13 @@ <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>true</WholeProgramOptimization> + <AdditionalOptions>/Qspectre %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + </ItemDefinitionGroup> <ItemGroup> <FilesToPackage Include="$(TargetPath)" /> <FilesToPackage Include="$(OutDir)$(TargetName).pdb" /> diff --git a/vs2017/xenvbd/xenvbd.vcxproj b/vs2017/xenvbd/xenvbd.vcxproj index d78672c..74af5fc 100644 --- a/vs2017/xenvbd/xenvbd.vcxproj +++ b/vs2017/xenvbd/xenvbd.vcxproj @@ -22,8 +22,9 @@ <ClCompile> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>__MODULE__="XENVBD";POOL_NX_OPTIN=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4548;4711;4820;4668;4255;6001;6054;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4548;4770;4711;4820;4668;4255;6001;6054;28160;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -33,7 +34,7 @@ <Link> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xencrsh.lib;$(DDK_LIB_PATH)/storport.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies)</AdditionalDependencies> - <EnableCOMDATFolding>false</EnableCOMDATFolding> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> <Inf> <SpecifyArchitecture>true</SpecifyArchitecture> @@ -58,6 +59,13 @@ <Architecture>amd64</Architecture> </Inf> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)'=='Windows 8 Release'"> + <ClCompile> + <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> + <WholeProgramOptimization>true</WholeProgramOptimization> + <AdditionalOptions>/Qspectre %(AdditionalOptions)</AdditionalOptions> + </ClCompile> + </ItemDefinitionGroup> <ItemGroup> <FilesToPackage Include="$(TargetPath)" /> <FilesToPackage Include="$(OutDir)$(TargetName).pdb" /> -- 2.5.3 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |