@@ -220,6 +220,7 @@ ObjectNode::~ObjectNode()
220
220
bool useDist = GetFlag ( FLAG_CAN_BE_DISTRIBUTED ) && m_AllowDistribution && FBuild::Get ().GetOptions ().m_AllowDistributed ;
221
221
bool useSimpleDist = GetCompiler ()->SimpleDistributionMode ();
222
222
bool usePreProcessor = !useSimpleDist && ( useCache || useDist || GetFlag ( FLAG_GCC ) || GetFlag ( FLAG_SNC ) || GetFlag ( FLAG_CLANG ) || GetFlag ( FLAG_CLANG_CL ) || GetFlag ( CODEWARRIOR_WII ) || GetFlag ( GREENHILLS_WIIU ) || GetFlag ( ObjectNode::FLAG_VBCC ) || GetFlag ( FLAG_ORBIS_WAVE_PSSLC ) );
223
+ // bool usePreProcessor = !useSimpleDist && ( useCache || useDist || GetFlag( FLAG_GCC ) || GetFlag( FLAG_SNC ) || ( GetFlag( FLAG_CLANG ) && useDist ) || GetFlag( CODEWARRIOR_WII ) || GetFlag( GREENHILLS_WIIU ) || GetFlag( ObjectNode::FLAG_VBCC ) || GetFlag( FLAG_ORBIS_WAVE_PSSLC ) );
223
224
if ( GetDedicatedPreprocessor () )
224
225
{
225
226
usePreProcessor = true ;
@@ -1985,6 +1986,41 @@ bool ObjectNode::BuildArgs( const Job * job, Args & fullArgs, Pass pass, bool us
1985
1986
}
1986
1987
}
1987
1988
1989
+ // %5 -> FirstExtraFile
1990
+ found = token.Find ( " %5" );
1991
+ if ( found )
1992
+ {
1993
+ AStackString<> extraFile;
1994
+ if ( job->IsLocal () == false )
1995
+ {
1996
+ job->GetToolManifest ()->GetRemoteFilePath ( 1 , extraFile );
1997
+ }
1998
+
1999
+ fullArgs += AStackString<>( token.Get (), found );
2000
+ fullArgs += job->IsLocal () ? GetCompiler ()->GetExtraFile ( 0 ) : extraFile;
2001
+ fullArgs += AStackString<>( found + 2 , token.GetEnd () );
2002
+ fullArgs.AddDelimiter ();
2003
+ continue ;
2004
+ }
2005
+
2006
+ // %CLFilterDependenciesOutput -> file name Unreal Engine's cl-filter -dependencies param
2007
+ // MSVC's /showIncludes option doesn't output anything when compiling a preprocessed file,
2008
+ // so in that case we change the file name so that it doesn't override the file generated
2009
+ // during preprocessing pass.
2010
+ found = token.Find ( " %CLFilterDependenciesOutput" );
2011
+ if ( found )
2012
+ {
2013
+ AString nameWithoutExtension ( m_Name );
2014
+ PathUtils::StripFileExtension ( nameWithoutExtension );
2015
+
2016
+ fullArgs += AStackString<>( token.Get (), found );
2017
+ fullArgs += nameWithoutExtension;
2018
+ fullArgs += pass == PASS_COMPILE_PREPROCESSED ? " .empty" : " .txt" ;
2019
+ fullArgs += AStackString<>( found + 27 , token.GetEnd () );
2020
+ fullArgs.AddDelimiter ();
2021
+ continue ;
2022
+ }
2023
+
1988
2024
// cl.exe treats \" as an escaped quote
1989
2025
// It's a common user error to terminate things (like include paths) with a quote
1990
2026
// this way, messing up the rest of the args and causing bizarre failures.
0 commit comments