diff --git a/modules/xcode/tests/test_xcode_project.lua b/modules/xcode/tests/test_xcode_project.lua index 51c245e5..a13c6f41 100644 --- a/modules/xcode/tests/test_xcode_project.lua +++ b/modules/xcode/tests/test_xcode_project.lua @@ -1703,6 +1703,62 @@ end + function suite.XCBuildConfigurationProject_OnOmitFramePointer() + omitframepointer "On" + prepare() + xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) + test.capture [[ + [MyProject:Debug(2)] /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; + CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OBJROOT = obj/Debug; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ( + "-fomit-frame-pointer", + ); + SYMROOT = bin/Debug; + }; + name = Debug; + }; + ]] + end + + + function suite.XCBuildConfigurationProject_OnNoOmitFramePointer() + omitframepointer "Off" + prepare() + xcode.XCBuildConfiguration_Project(tr, tr.configs[1]) + test.capture [[ + [MyProject:Debug(2)] /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(NATIVE_ARCH_ACTUAL)"; + CONFIGURATION_BUILD_DIR = "$(SYMROOT)"; + CONFIGURATION_TEMP_DIR = "$(OBJROOT)"; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OBJROOT = obj/Debug; + ONLY_ACTIVE_ARCH = NO; + OTHER_CFLAGS = ( + "-fno-omit-frame-pointer", + ); + SYMROOT = bin/Debug; + }; + name = Debug; + }; + ]] + end + + function suite.XCBuildConfigurationProject_OnNoPCH() pchheader "MyProject_Prefix.pch" flags { "NoPCH" } diff --git a/modules/xcode/xcode_common.lua b/modules/xcode/xcode_common.lua index 1fe58ba9..284ab873 100644 --- a/modules/xcode/xcode_common.lua +++ b/modules/xcode/xcode_common.lua @@ -1143,9 +1143,10 @@ -- build list of "other" C/C++ flags local checks = { - ["-ffast-math"] = cfg.floatingpoint == "Fast", - ["-ffloat-store"] = cfg.floatingpoint == "Strict", - ["-fomit-frame-pointer"] = cfg.flags.NoFramePointer, + ["-ffast-math"] = cfg.floatingpoint == "Fast", + ["-ffloat-store"] = cfg.floatingpoint == "Strict", + ["-fomit-frame-pointer"] = cfg.omitframepointer == "On", + ["-fno-omit-frame-pointer"] = cfg.omitframepointer == "Off", } local flags = { }