Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[iOS] Add gss framework back into sample linker args
#81919 introduced a regression where the gss framework was omitted from the sample build. This change adds it back in.

Fixes dotnet/performance#2924
  • Loading branch information
Steve Pfister committed Mar 9, 2023
commit c01475b686cb83d73742e9737192dbe9e7c61553
2 changes: 1 addition & 1 deletion src/mono/msbuild/apple/build/AppleApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<!-- common linker arguments for app and library builds -->
<ItemGroup>
<_CommonLinkerArgs Condition="'$(TargetOS)' != 'tvos'" Include="-framework GSS" />
<_CommonLinkerArgs Condition="'$(_IsLibraryMode)' == 'true' and '$(TargetOS)' != 'tvos'" Include="-framework GSS" />
</ItemGroup>

<PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/tasks/AppleAppBuilder/Xcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,20 @@ public string GenerateCMake(
toLink += $" {asmLinkFile}{Environment.NewLine}";
}

string frameworks = "";
if ((Target == TargetNames.iOS) || (Target == TargetNames.iOSsim) || (Target == TargetNames.MacCatalyst))
{
frameworks = "\"-framework GSS\"";
}

string appLinkerArgs = "";
foreach(string linkerArg in extraLinkerArgs)
{
appLinkerArgs += $" \"{linkerArg}\"{Environment.NewLine}";
}

appLinkerArgs += $" {frameworks}{Environment.NewLine}";

cmakeLists = cmakeLists.Replace("%NativeLibrariesToLink%", toLink);
cmakeLists = cmakeLists.Replace("%APP_LINKER_ARGS%", appLinkerArgs);
cmakeLists = cmakeLists.Replace("%AotSources%", aotSources);
Expand Down