Ejemplo n.º 1
0
        public static IUEToolChain GetPlatformToolChain(CPPTargetPlatform Platform)
        {
            UEBuildPlatform        BuildPlatform = UEBuildPlatform.GetBuildPlatform(UEBuildTarget.CPPTargetPlatformToUnrealTargetPlatform(Platform));
            UEBuildPlatformContext Context       = BuildPlatform.CreateContext(null);

            return(Context.CreateToolChain(BuildPlatform.DefaultCppPlatform));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Validates the configuration. E.g. some options are mutually exclusive whereof some imply others. Also
        /// some functionality is not available on all platforms.
        /// @warning: the order of validation is important
        /// </summary>
        /// <param name="Configuration">Current configuration (e.g. development, debug, ...)</param>
        /// <param name="Platform">Current platform (e.g. Win32, PS3, ...)</param>
        /// <param name="bCreateDebugInfo">True if debug info should be created</param>
        public static void ValidateConfiguration(CPPTargetConfiguration Configuration, CPPTargetPlatform Platform, bool bCreateDebugInfo, UEBuildPlatformContext PlatformContext)
        {
            UEBuildPlatform BuildPlatform = UEBuildPlatform.GetBuildPlatformForCPPTargetPlatform(Platform);

            // E&C support.
            if (bSupportEditAndContinue)
            {
                bUseIncrementalLinking = BuildPlatform.ShouldUseIncrementalLinking(Platform, Configuration);
            }

            // Incremental linking.
            if (bUseIncrementalLinking)
            {
                bUsePDBFiles = BuildPlatform.ShouldUsePDBFiles(Platform, Configuration, bCreateDebugInfo);
            }

            // Detailed stats
            if (bLogDetailedActionStats && bAllowXGE)
            {
                // Some build machines apparently have this turned on, so if you really want detailed stats, don't run with XGE
                bLogDetailedActionStats = false;
            }

            // PDB
            if (bUsePDBFiles)
            {
                // NOTE: Currently we allow XGE to run, even with PDBs, until we notice an issue with this
                bool bDisallowXGEWithPDBFiles = false;
                if (bDisallowXGEWithPDBFiles)
                {
                    // Force local execution as we have one PDB for all files using the same PCH. This currently doesn't
                    // scale well with XGE due to required networking bandwidth. Xoreax mentioned that this was going to
                    // be fixed in a future version of the software.
                    bAllowXGE = false;
                }
            }

            // Allow for the build platform to perform custom validation here...
            // NOTE: This CAN modify the static BuildConfiguration settings!!!!
            PlatformContext.ValidateBuildConfiguration(Configuration, Platform, bCreateDebugInfo);

            if (!BuildPlatform.CanUseXGE())
            {
                bAllowXGE = false;
            }

            if (!BuildPlatform.CanUseDistcc())
            {
                bAllowDistcc = false;
            }

            if (!BuildPlatform.CanUseSNDBS())
            {
                bAllowSNDBS = false;
            }

            // If we're compiling just a single file, we need to prevent unity builds from running
            if (SingleFileToCompile != null)
            {
                bUseUnityBuild   = false;
                bForceUnityBuild = false;
            }
        }