diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs index cda2ca568..6340724d0 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs @@ -45,6 +45,7 @@ public abstract partial class BaseApplePlatform + ' [cmdLineOptions.WarningReturnType]' + ' [cmdLineOptions.RuntimeTypeInfo]' + ' [cmdLineOptions.ClangEnableObjC_ARC]' + + ' [cmdLineOptions.ClangEnableObjC_Weak]' + ' [cmdLineOptions.CppExceptions]' + ' [cmdLineOptions.ObjCExceptions]' + ' [cmdLineOptions.ObjCARCExceptions]' diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs index bb6f874f4..863442222 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs @@ -703,8 +703,8 @@ public virtual void SelectCompilerOptions(IGenerationContext context) ); context.SelectOption( - Options.Option(Options.XCode.Compiler.ObjCWeakReferences.Disable, () => options["ObjCWeakReferences"] = "NO"), - Options.Option(Options.XCode.Compiler.ObjCWeakReferences.Enable, () => options["ObjCWeakReferences"] = "YES") + Options.Option(Options.XCode.Compiler.ObjCWeakReferences.Disable, () => { options["ObjCWeakReferences"] = "NO"; cmdLineOptions["ClangEnableObjC_Weak"] = FileGeneratorUtilities.RemoveLineTag; }), + Options.Option(Options.XCode.Compiler.ObjCWeakReferences.Enable, () => { options["ObjCWeakReferences"] = "YES"; cmdLineOptions["ClangEnableObjC_Weak"] = "-fobjc-weak"; }) ); context.SelectOption(