Returns the |XcodeArchsDefault| object to use to expand ARCHS for the installed version of Xcode. The default values used by Xcode for ARCHS and the expansion of the variables depends on the version of Xcode used. For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included
()
| 94 | |
| 95 | |
| 96 | def GetXcodeArchsDefault(): |
| 97 | """Returns the |XcodeArchsDefault| object to use to expand ARCHS for the |
| 98 | installed version of Xcode. The default values used by Xcode for ARCHS |
| 99 | and the expansion of the variables depends on the version of Xcode used. |
| 100 | |
| 101 | For all version anterior to Xcode 5.0 or posterior to Xcode 5.1 included |
| 102 | uses $(ARCHS_STANDARD) if ARCHS is unset, while Xcode 5.0 to 5.0.2 uses |
| 103 | $(ARCHS_STANDARD_INCLUDING_64_BIT). This variable was added to Xcode 5.0 |
| 104 | and deprecated with Xcode 5.1. |
| 105 | |
| 106 | For "macosx" SDKROOT, all version starting with Xcode 5.0 includes 64-bit |
| 107 | architecture as part of $(ARCHS_STANDARD) and default to only building it. |
| 108 | |
| 109 | For "iphoneos" and "iphonesimulator" SDKROOT, 64-bit architectures are part |
| 110 | of $(ARCHS_STANDARD_INCLUDING_64_BIT) from Xcode 5.0. From Xcode 5.1, they |
| 111 | are also part of $(ARCHS_STANDARD). |
| 112 | |
| 113 | All these rules are coded in the construction of the |XcodeArchsDefault| |
| 114 | object to use depending on the version of Xcode detected. The object is |
| 115 | for performance reason.""" |
| 116 | global XCODE_ARCHS_DEFAULT_CACHE |
| 117 | if XCODE_ARCHS_DEFAULT_CACHE: |
| 118 | return XCODE_ARCHS_DEFAULT_CACHE |
| 119 | xcode_version, _ = XcodeVersion() |
| 120 | if xcode_version < "0500": |
| 121 | XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( |
| 122 | "$(ARCHS_STANDARD)", |
| 123 | XcodeArchsVariableMapping(["i386"]), |
| 124 | XcodeArchsVariableMapping(["i386"]), |
| 125 | XcodeArchsVariableMapping(["armv7"]), |
| 126 | ) |
| 127 | elif xcode_version < "0510": |
| 128 | XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( |
| 129 | "$(ARCHS_STANDARD_INCLUDING_64_BIT)", |
| 130 | XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), |
| 131 | XcodeArchsVariableMapping(["i386"], ["i386", "x86_64"]), |
| 132 | XcodeArchsVariableMapping( |
| 133 | ["armv7", "armv7s"], ["armv7", "armv7s", "arm64"] |
| 134 | ), |
| 135 | ) |
| 136 | else: |
| 137 | XCODE_ARCHS_DEFAULT_CACHE = XcodeArchsDefault( |
| 138 | "$(ARCHS_STANDARD)", |
| 139 | XcodeArchsVariableMapping(["x86_64"], ["x86_64"]), |
| 140 | XcodeArchsVariableMapping(["i386", "x86_64"], ["i386", "x86_64"]), |
| 141 | XcodeArchsVariableMapping( |
| 142 | ["armv7", "armv7s", "arm64"], ["armv7", "armv7s", "arm64"] |
| 143 | ), |
| 144 | ) |
| 145 | return XCODE_ARCHS_DEFAULT_CACHE |
| 146 | |
| 147 | |
| 148 | class XcodeSettings: |
no test coverage detected