From 6eec5f32b65e37916c57500a39624c514b441beb Mon Sep 17 00:00:00 2001 From: yhuang Date: Thu, 24 Aug 2023 16:27:35 -0500 Subject: [PATCH] support set RTTI compiler option for fastbuild --- .../Apple/BaseApplePlatform.Bff.Template.cs | 1 + .../Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs index c13c897ad..2101940c3 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.Bff.Template.cs @@ -41,6 +41,7 @@ public abstract partial class BaseApplePlatform + ' [cmdLineOptions.SDKRoot]' + ' [cmdLineOptions.CppLanguageStd]' + ' [cmdLineOptions.CLanguageStd]' + + ' [cmdLineOptions.RuntimeTypeInfo]' + ' [cmdLineOptions.ClangEnableObjC_ARC]' "; diff --git a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs index c31ea0b87..57a6a0f68 100644 --- a/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs +++ b/Sharpmake.Platforms/Sharpmake.CommonPlatforms/Apple/BaseApplePlatform.cs @@ -723,8 +723,8 @@ public virtual void SelectCompilerOptions(IGenerationContext context) ); context.SelectOption( - Options.Option(Options.XCode.Compiler.RTTI.Disable, () => { options["RuntimeTypeInfo"] = "NO"; }), - Options.Option(Options.XCode.Compiler.RTTI.Enable, () => { options["RuntimeTypeInfo"] = "YES"; }) + Options.Option(Options.XCode.Compiler.RTTI.Disable, () => { options["RuntimeTypeInfo"] = "NO"; cmdLineOptions["RuntimeTypeInfo"] = "-fno-rtti"; }), + Options.Option(Options.XCode.Compiler.RTTI.Enable, () => { options["RuntimeTypeInfo"] = "YES"; cmdLineOptions["RuntimeTypeInfo"] = "-frtti"; }) ); context.SelectOption(