From df3b7ea9249252147323a5502ded32e7d7a84cdd Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 12 Oct 2015 05:02:42 -0700 Subject: [PATCH] Don't require ARC on iOS rebuild --- lime/tools/platforms/IOSPlatform.hx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lime/tools/platforms/IOSPlatform.hx b/lime/tools/platforms/IOSPlatform.hx index a80efe8cd..d4fa8e561 100644 --- a/lime/tools/platforms/IOSPlatform.hx +++ b/lime/tools/platforms/IOSPlatform.hx @@ -329,14 +329,26 @@ class IOSPlatform extends PlatformTarget { var i386 = (command == "rebuild" || project.targetFlags.exists ("simulator")); var x86_64 = (command == "rebuild" || project.targetFlags.exists ("simulator")); + var arc = (project.targetFlags.exists ("arc")); + var commands = []; - if (armv6) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DOBJC_ARC" ]); - if (armv7) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARMV7", "-DOBJC_ARC" ]); - if (armv7s) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARMV7S", "-DOBJC_ARC" ]); - if (arm64) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARM64", "-DOBJC_ARC" ]); - if (i386) commands.push ([ "-Dios", "-Dsimulator", "-DHXCPP_CPP11", "-DOBJC_ARC" ]); - if (x86_64) commands.push ([ "-Dios", "-Dsimulator", "-DHXCPP_M64", "-DHXCPP_CPP11", "-DOBJC_ARC" ]); + if (armv6) commands.push ([ "-Dios", "-DHXCPP_CPP11" ]); + if (armv7) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARMV7" ]); + if (armv7s) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARMV7S" ]); + if (arm64) commands.push ([ "-Dios", "-DHXCPP_CPP11", "-DHXCPP_ARM64" ]); + if (i386) commands.push ([ "-Dios", "-Dsimulator", "-DHXCPP_CPP11" ]); + if (x86_64) commands.push ([ "-Dios", "-Dsimulator", "-DHXCPP_M64", "-DHXCPP_CPP11" ]); + + if (arc) { + + for (command in commands) { + + command.push ("-DOBJC_ARC"); + + } + + } CPPHelper.rebuild (project, commands);