UnrealBuildTool: Fix a rare exeception I saw when generating project files

#rnx

[CL 29197565 by joe kirchoff in ue5-main branch]
This commit is contained in:
joe kirchoff
2023-10-27 16:55:01 -04:00
parent af7105cccd
commit 07d9f6887b

View File

@@ -342,13 +342,11 @@ namespace UnrealBuildTool
GlobalDefinitions.Add("USE_ANDROID_LAUNCH=0");
GlobalDefinitions.Add("USE_ANDROID_JNI=0");
string VersionScriptFile = Path.GetTempPath() + "LLTWorkaroundScrip.ldscript";
using (StreamWriter Writer = System.IO.File.CreateText(VersionScriptFile))
{
// Workaround for a linker bug when building LowLevelTests for Android
Writer.WriteLine("{ local: *; };");
}
AdditionalLinkerArguments = " -Wl,--version-script=\"" + VersionScriptFile + "\"";
// Workaround for a linker bug when building LowLevelTests for Android
// TODO: This should be written to the intermediate directory, somewhere else not when TargetRules are being created
FileReference VersionScriptFile = new FileReference(Path.GetTempPath() + $"LLTWorkaroundScrip-{Name}.ldscript");
FileReference.WriteAllTextIfDifferent(VersionScriptFile, "{ local: *; };");
AdditionalLinkerArguments = " -Wl,--version-script=\"" + VersionScriptFile.FullName + "\"";
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{