Skip to content

Commit bbec090

Browse files
Merge pull request #2458 from artamonovoleg/master
fix optimize('Debug') for xcode project generator
2 parents 88c045b + c044bf6 commit bbec090

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

modules/xcode/tests/test_xcode_project.lua

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,29 @@
22662266
]]
22672267
end
22682268

2269+
function suite.XCBuildConfigurationProject_OnOptimizeDebug()
2270+
optimize "Debug"
2271+
prepare()
2272+
xcode.XCBuildConfiguration_Project(tr, tr.configs[1])
2273+
test.capture [[
2274+
A14350AC4595EE5E57CE36EC /* Debug */ = {
2275+
isa = XCBuildConfiguration;
2276+
buildSettings = {
2277+
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
2278+
CONFIGURATION_BUILD_DIR = "$(SYMROOT)";
2279+
CONFIGURATION_TEMP_DIR = "$(OBJROOT)";
2280+
GCC_OPTIMIZATION_LEVEL = g;
2281+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
2282+
GCC_WARN_ABOUT_RETURN_TYPE = YES;
2283+
GCC_WARN_UNUSED_VARIABLE = YES;
2284+
OBJROOT = obj/Debug;
2285+
ONLY_ACTIVE_ARCH = NO;
2286+
SYMROOT = bin/Debug;
2287+
};
2288+
name = Debug;
2289+
};
2290+
]]
2291+
end
22692292

22702293
function suite.XCBuildConfigurationProject_OnOptimizeSize()
22712294
optimize "Size"

modules/xcode/xcode_common.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@
14901490
settings['GCC_ENABLE_OBJC_EXCEPTIONS'] = 'NO'
14911491
end
14921492

1493-
local optimizeMap = { On = 3, Size = 's', Speed = 3, Full = 'fast', Debug = 1 }
1493+
local optimizeMap = { On = 3, Size = 's', Speed = 3, Full = 'fast', Debug = 'g' }
14941494
settings['GCC_OPTIMIZATION_LEVEL'] = optimizeMap[cfg.optimize] or 0
14951495

14961496
if cfg.pchheader and not cfg.flags.NoPCH then

0 commit comments

Comments
 (0)