From a0c29e7dd67abb15c74c85f07741784877edfdcd Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Mon, 2 Sep 2013 11:39:10 -0700 Subject: General: * Fixed a variety of server browser issues with mods based on this SDK * Fixed many warnings on various platforms * Added source code for fgdlib and raytrace * Updated many source files with the latest shared source from TF2. OSX: * Added support for Xcode 4.6 * Switched OSX builds to use Xcode instead of makefiles * Moved libs from src/lib/osx32 to src/lib/public/osx32 or src/lib/common/osx32 to match windows better. Linux: * Moved libs from src/lib/linux32 to src/lib/public/linux32 or src/lib/common/linux32 to match windows better. --- mp/src/vpc_scripts/source_dll_win32_release.vpc | 74 +++++++++++++++++-------- 1 file changed, 50 insertions(+), 24 deletions(-) (limited to 'mp/src/vpc_scripts/source_dll_win32_release.vpc') diff --git a/mp/src/vpc_scripts/source_dll_win32_release.vpc b/mp/src/vpc_scripts/source_dll_win32_release.vpc index 997d5809..58eea752 100644 --- a/mp/src/vpc_scripts/source_dll_win32_release.vpc +++ b/mp/src/vpc_scripts/source_dll_win32_release.vpc @@ -6,18 +6,34 @@ $IgnoreRedundancyWarning "ON" -$MacroRequired "PLATSUBDIR" +// Disable frame pointer omission to allow fast stack walking, necessary for +// good ETW profiling. +$Macro NOFPO "1" + $MacroRequired "SRCDIR" $MacroRequired "OUTBINNAME" $MacroRequired "OUTBINDIR" +$MacroRequired "LIBPUBLIC" +$MacroRequired "LIBCOMMON" +$MacroRequired "PLATSUBDIR" +$MacroRequired "OUTDLLEXT" +$MacroRequiredAllowEmpty "GAMENAME" +$MacroRequiredAllowEmpty "INTERMEDIATESUBDIR" +$MacroRequiredAllowEmpty "_UNITYSUBDIR" +$Macro "_SUBDIRSUFFIX" "$INTERMEDIATESUBDIR$GAMENAME$PLATSUBDIR$_UNITYSUBDIR" $Configuration "Release" { $General { // General - $OutputDirectory ".\Release$PLATSUBDIR" - $IntermediateDirectory ".\Release$PLATSUBDIR" + $OutputDirectory ".\Release$_SUBDIRSUFFIX" [!$RETAIL && !$PROFILE] + $IntermediateDirectory ".\Release$_SUBDIRSUFFIX" [!$RETAIL && !$PROFILE] + $OutputDirectory ".\Retail$_SUBDIRSUFFIX" [$RETAIL] + $IntermediateDirectory ".\Retail$_SUBDIRSUFFIX" [$RETAIL] + $OutputDirectory ".\Profile$_SUBDIRSUFFIX" [!$RETAIL && $PROFILE] + $IntermediateDirectory ".\Profile$_SUBDIRSUFFIX" [!$RETAIL && $PROFILE] + $ExtensionsToDeleteOnClean $BuildLogFile $InheritedProjectPropertySheets @@ -29,7 +45,7 @@ $Configuration "Release" $MinimizeCRTUseInATL $CharacterSet "Use Multi-Byte Character Set" $CommonLanguageRuntimeSupport - $WholeProgramOptimization + $WholeProgramOptimization "Use Link Time Code Generation" [$LTCG] } $Debugging @@ -52,7 +68,6 @@ $Configuration "Release" $DebugInformationFormat "Program Database (/Zi)" $SuppressStartupBanner $WarningLevel "Level 4 (/W4)" - $Detect64bitPortabilityIssues "Yes (/Wp64)" $TreatWarningsAsErrors $UseUNICODEResponseFiles @@ -66,10 +81,8 @@ $Configuration "Release" $WholeProgramOptimization // Preprocessor - $PreprocessorDefinitions "WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=$OUTBINNAME" - // Enable asserts in release builds if /define:releaseasserts is specified on the VPC command line. - $PreprocessorDefinitions "$BASE;RELEASEASSERTS" [$RELEASEASSERTS] - $PreprocessorDefinitions "$BASE;RAD_TELEMETRY_DISABLED" [$SOURCESDK] + $PreprocessorDefinitions "$BASE;WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $PreprocessorDefinitions "$BASE;RELEASE_ASSERTS" [$RELEASEASSERTS] $IgnoreStandardIncludePath $GeneratePreprocessedFile $KeepComments @@ -82,11 +95,10 @@ $Configuration "Release" $BasicRuntimeChecks $RuntimeLibrary "Multi-threaded (/MT)" $StructMemberAlignment - $BufferSecurityCheck "Yes" [$STAGING_ONLY] - $BufferSecurityCheck "No" [!$STAGING_ONLY] + $BufferSecurityCheck "No" [$RETAIL] + $BufferSecurityCheck "Yes" [!$RETAIL] $EnableFunctionLevelLinking "Yes (/Gy)" $EnableEnhancedInstructionSet - $EnableEnhancedInstructionSet "Streaming SIMD Extensions (/arch:SSE)" [$WIN32] $FloatingPointModel "Fast (/fp:fast)" $EnableFloatingPointExceptions @@ -125,20 +137,21 @@ $Configuration "Release" $ShowIncludes $UndefinePreprocessorDefinitions $UndefineAllPreprocessorDefinitions - $UseFullPaths + $UseFullPaths "Yes (/FC)" $OmitDefaultLibraryNames $ErrorReporting "Prompt Immediately (/errorReport:prompt)" - // Command Line - $AdditionalOptions "$BASE /MP" + // Command Line (L4D adding /MP) + $AdditionalOptions "/MP /Zm200" // Enable extra debugging information. - $AdditionalOptions "$BASE /d2Zi+" + $AdditionalOptions "$BASE /d2Zi+" [$VS2010] + $AdditionalOptions "$BASE /Oy-" [$NOFPO] } $Linker { // General - $OutputFile "$(OutDir)/$OUTBINNAME.dll" + $OutputFile "$(OutDir)/$OUTBINNAME$OUTDLLEXT" $ShowProgress "Not Set" $Version $EnableIncrementalLinking "No (/INCREMENTAL:NO)" @@ -166,13 +179,12 @@ $Configuration "Release" $ManifestFile $AdditionalManifestDependencies $AllowIsolation + //$UACExecutionLevel // Debugging $GenerateDebugInfo "Yes (/DEBUG)" $GenerateProgramDatabaseFile "$(IntDir)/$(TargetName).pdb" $StripPrivateSymbols - $GenerateMapFile "No" - $MapFileName "$(IntDir)/$(TargetName).map" $MapExports $DebuggableAssembly @@ -188,9 +200,22 @@ $Configuration "Release" $SwapRunFromNetwork $Driver + // RandomizeBaseAddress (/DYNAMICBASE, /ASLR) is a hugely important security setting. + // However it can cause confusion during development and can make tracking down certain + // bugs tricky by making code/stack/heap addresses change between runs. Enable for retail, + // but disable for development builds. + $RandomizedBaseAddress "true" [$RETAIL] + $RandomizedBaseAddress "false" [!$RETAIL] + // Optimization $References "Eliminate Unreferenced Data (/OPT:REF)" - $EnableCOMDATFolding "Remove Redundant COMDATs (/OPT:ICF)" + // COMDAT folding can be very confusing when debugging and profiling because it can + // cause execution to go through nonsensical functions (that happen to be binary + // equivalent to the logical function). The performance benefit is small enough that + // it is not worth enabling in the development builds. It should be enabled on retail + // builds. + $EnableCOMDATFolding "Remove Redundant COMDATs (/OPT:ICF)" [$RETAIL] + $EnableCOMDATFolding "No (/OPT:NOICF)" [!$RETAIL] $OptimizeForWindows98 $FunctionOrder $ProfileGuidedDatabase @@ -208,12 +233,13 @@ $Configuration "Release" $NoEntryPoint $SetChecksum $BaseAddress "$LOADADDRESS_DEVELOPMENT" - $BaseAddress "$LOADADDRESS_RETAIL" [$RETAIL] + //$BaseAddress "$LOADADDRESS_RETAIL" [$RETAIL] $FixedBaseAddress $TurnOffAssemblyGeneration $DelayLoadedDLL $ImportLibrary $MergeSections + $TargetMachine $Profile $CLRThreadAttribute $CLRImageType @@ -224,7 +250,7 @@ $Configuration "Release" $CLRUnmanagedCodeCheck // Command Line - $AdditionalOptions "$BASE /DYNAMICBASE" + $AdditionalOptions } $ManifestTool @@ -280,7 +306,7 @@ $Configuration "Release" $Resources { // General - $PreprocessorDefinitions "NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" + $PreprocessorDefinitions "$BASE;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE" $Culture "English (United States) (0x409)" $AdditionalIncludeDirectories $IgnoreStandardIncludePath @@ -320,4 +346,4 @@ $Configuration "Release" $Outputs $AdditionalDependencies } -} \ No newline at end of file +} -- cgit v1.2.3