[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 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/xen/xen.vcxproj | 12 ++++++++++-- vs2017/xenbus/xenbus.vcxproj | 12 ++++++++++-- vs2017/xenfilt/xenfilt.vcxproj | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/vs2017/xen/xen.vcxproj b/vs2017/xen/xen.vcxproj index de215c0..e277127 100644 --- a/vs2017/xen/xen.vcxproj +++ b/vs2017/xen/xen.vcxproj @@ -22,8 +22,9 @@ <ClCompile> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>__MODULE__="XEN";POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4711;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -33,8 +34,8 @@ <Link> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/aux_klib.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> <ModuleDefinitionFile>../../src/xen/xen.def</ModuleDefinitionFile> - <EnableCOMDATFolding>false</EnableCOMDATFolding> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> @@ -47,6 +48,13 @@ <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions);_AMD64_</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/xenbus/xenbus.vcxproj b/vs2017/xenbus/xenbus.vcxproj index 038d3d7..f3e62ec 100644 --- a/vs2017/xenbus/xenbus.vcxproj +++ b/vs2017/xenbus/xenbus.vcxproj @@ -21,9 +21,10 @@ <ItemDefinitionGroup> <ClCompile> <PreprocessorDefinitions>__MODULE__="XENBUS";POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4711;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -33,7 +34,7 @@ <Link> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;$(DDK_LIB_PATH)/rtlver.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" /> diff --git a/vs2017/xenfilt/xenfilt.vcxproj b/vs2017/xenfilt/xenfilt.vcxproj index fe6ba38..941057e 100644 --- a/vs2017/xenfilt/xenfilt.vcxproj +++ b/vs2017/xenfilt/xenfilt.vcxproj @@ -21,9 +21,10 @@ <ItemDefinitionGroup> <ClCompile> <PreprocessorDefinitions>__MODULE__="XENFILT";POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories> <WarningLevel>EnableAllWarnings</WarningLevel> - <DisableSpecificWarnings>4464;4711;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> + <DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;6001;6054;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings> <MultiProcessorCompilation>true</MultiProcessorCompilation> <EnablePREfast>true</EnablePREfast> </ClCompile> @@ -33,7 +34,7 @@ <Link> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <AdditionalDependencies>$(ProjectDir)..\$(ConfigurationName)\$(Platform)\xen.lib;$(DDK_LIB_PATH)/libcntpr.lib;$(DDK_LIB_PATH)/procgrp.lib;%(AdditionalDependencies)</AdditionalDependencies> - <EnableCOMDATFolding>false</EnableCOMDATFolding> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'"> @@ -46,6 +47,13 @@ <PreprocessorDefinitions>__x86_64__;%(PreprocessorDefinitions);_AMD64_</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" /> -- 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 |