Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Update Xcode version to 12.5.1. (bazel-ios#369)
Browse files Browse the repository at this point in the history
* Update Xcode version to 12.5.1

Co-authored-by: Jerry Marino <[email protected]>
  • Loading branch information
jgraves and jerrymarino authored Dec 14, 2021
1 parent eecb6d1 commit 30a1cf2
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 42 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ jobs:
run: find $PWD -type f \( -name 'WORKSPACE' -o -name '*.bzl' -o -name '*.bazel' \) | xargs bazel run buildifier -- -lint=fix && git diff --exit-code
- name: Check docs
run: bazelisk run docs && git diff --exit-code docs
xcodeproj_tests_xcode_12_2:
name: .xcodeproj Tests on Xcode 12.2
xcodeproj_tests_xcode_12_5_1:
name: .xcodeproj Tests on Xcode 12.5.1
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Select Xcode 12.2
run: sudo xcode-select -s /Applications/Xcode_12.2.app
- name: Select Xcode 12.5.1
run: .github/workflows/xcode_select.sh
- name: Run tests
run: ./tests/xcodeproj-tests.sh --clean
multi_arch_support:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/xcode_select.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ set -e
echo "Selecting Xcode for environment"
printenv
sudo xcode-select -p
sudo xcode-select -s /Applications/Xcode_12.2.app
sudo xcode-select -s /Applications/Xcode_12.5.1.app
28 changes: 26 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ config_setting(
xcode_version(
name = "version12_2_0_12B45b",
aliases = [
"12",
"12.2",
"12.2.0",
"12.2.0.12B45b",
Expand All @@ -53,9 +52,34 @@ xcode_version(

xcode_config(
name = "host_xcodes",
default = ":version12_2_0_12B45b",
default = ":version12_5_1_12E507",
versions = [
":version12_2_0_12B45b",
":version12_5_1_12E507",
],
visibility = ["//visibility:public"],
)

xcode_version(
name = "version12_5_1_12E507",
aliases = [
"12.5.1",
"12",
"12.5",
"12.5.1.12E507",
],
default_ios_sdk_version = "14.5",
default_macos_sdk_version = "11.3",
default_tvos_sdk_version = "14.5",
default_watchos_sdk_version = "7.4",
version = "12.5.1.12E507",
)

available_xcodes(
name = "host_available_xcodes",
default = ":version12_5_1_12E507",
versions = [
":version12_5_1_12E507",
":version12_2_0_12B45b",
],
)
43 changes: 30 additions & 13 deletions data/xcspec_evals.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
############################################################################
# THIS IS GENERATED CODE #
# Extracted from Xcode 12.2 #
# Extracted from Xcode 12.5.1.12E507 #
# To update, in rules_ios run `bazel run data_generators:extract_xcspecs` #
############################################################################

Expand Down Expand Up @@ -155,7 +155,7 @@ def _com_apple_compilers_llvm_clang_1_0__CLANG_ENABLE_MODULE_DEBUGGING__DefaultV
return (False, "YES")

def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__Condition(xcconfigs, id_configs):
# $(GCC_GENERATE_DEBUGGING_SYMBOLS) == YES && ( $(CLANG_ENABLE_MODULES) == YES || ( $(GCC_PREFIX_HEADER) != '' && $(GCC_PRECOMPILE_PREFIX_HEADER) == YES ) )
# $(GCC_GENERATE_DEBUGGING_SYMBOLS) == YES && ! $(INDEX_ENABLE_BUILD_ARENA) && ( $(CLANG_ENABLE_MODULES) == YES || ( $(GCC_PREFIX_HEADER) != '' && $(GCC_PRECOMPILE_PREFIX_HEADER) == YES ) )

used_user_content = False

Expand All @@ -171,7 +171,7 @@ def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__Condition(xcconfig
used_user_content = used_user_content or eval_val_0_used_user_content

eval_val_1 = ""
eval_key_1 = "CLANG_ENABLE_MODULES"
eval_key_1 = "INDEX_ENABLE_BUILD_ARENA"
if eval_key_1 in xcconfigs:
eval_val_1 = xcconfigs[eval_key_1]
used_user_content = True
Expand All @@ -182,7 +182,7 @@ def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__Condition(xcconfig
used_user_content = used_user_content or eval_val_1_used_user_content

eval_val_2 = ""
eval_key_2 = "GCC_PREFIX_HEADER"
eval_key_2 = "CLANG_ENABLE_MODULES"
if eval_key_2 in xcconfigs:
eval_val_2 = xcconfigs[eval_key_2]
used_user_content = True
Expand All @@ -193,7 +193,7 @@ def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__Condition(xcconfig
used_user_content = used_user_content or eval_val_2_used_user_content

eval_val_3 = ""
eval_key_3 = "GCC_PRECOMPILE_PREFIX_HEADER"
eval_key_3 = "GCC_PREFIX_HEADER"
if eval_key_3 in xcconfigs:
eval_val_3 = xcconfigs[eval_key_3]
used_user_content = True
Expand All @@ -203,7 +203,18 @@ def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__Condition(xcconfig
(eval_val_3_used_user_content, eval_val_3) = XCSPEC_EVALS[opt["DefaultValue"]](xcconfigs, id_configs)
used_user_content = used_user_content or eval_val_3_used_user_content

return (used_user_content, (eval_val_0 == "YES" and (eval_val_1 == "YES" or (eval_val_2 != "" and eval_val_3 == "YES"))))
eval_val_4 = ""
eval_key_4 = "GCC_PRECOMPILE_PREFIX_HEADER"
if eval_key_4 in xcconfigs:
eval_val_4 = xcconfigs[eval_key_4]
used_user_content = True
elif eval_key_4 in id_configs:
opt = id_configs[eval_key_4]
if "DefaultValue" in opt:
(eval_val_4_used_user_content, eval_val_4) = XCSPEC_EVALS[opt["DefaultValue"]](xcconfigs, id_configs)
used_user_content = used_user_content or eval_val_4_used_user_content

return (used_user_content, (eval_val_0 == "YES" and not eval_val_1 and (eval_val_2 == "YES" or (eval_val_3 != "" and eval_val_4 == "YES"))))

def _com_apple_compilers_llvm_clang_1_0__CLANG_DEBUG_MODULES__DefaultValue(xcconfigs, id_configs):
# $(CLANG_ENABLE_MODULE_DEBUGGING)
Expand Down Expand Up @@ -2770,7 +2781,7 @@ def _com_apple_pbx_linkers_ld__LD_VERIFY_BITCODE__DefaultValue(xcconfigs, id_con
return (False, "YES")

def _com_apple_pbx_linkers_ld__LD_HIDE_BITCODE_SYMBOLS__Condition(xcconfigs, id_configs):
# $(ENABLE_BITCODE) == YES && $(BITCODE_GENERATION_MODE) == bitcode
# $(ENABLE_BITCODE) == YES && $(BITCODE_GENERATION_MODE) == bitcode && $(MACH_O_TYPE) != mh_object

used_user_content = False

Expand All @@ -2796,7 +2807,18 @@ def _com_apple_pbx_linkers_ld__LD_HIDE_BITCODE_SYMBOLS__Condition(xcconfigs, id_
(eval_val_1_used_user_content, eval_val_1) = XCSPEC_EVALS[opt["DefaultValue"]](xcconfigs, id_configs)
used_user_content = used_user_content or eval_val_1_used_user_content

return (used_user_content, (eval_val_0 == "YES" and eval_val_1 == "bitcode"))
eval_val_2 = ""
eval_key_2 = "MACH_O_TYPE"
if eval_key_2 in xcconfigs:
eval_val_2 = xcconfigs[eval_key_2]
used_user_content = True
elif eval_key_2 in id_configs:
opt = id_configs[eval_key_2]
if "DefaultValue" in opt:
(eval_val_2_used_user_content, eval_val_2) = XCSPEC_EVALS[opt["DefaultValue"]](xcconfigs, id_configs)
used_user_content = used_user_content or eval_val_2_used_user_content

return (used_user_content, (eval_val_0 == "YES" and eval_val_1 == "bitcode" and eval_val_2 != "mh_object"))

def _com_apple_pbx_linkers_ld__LD_HIDE_BITCODE_SYMBOLS__DefaultValue(xcconfigs, id_configs):
# $(HIDE_BITCODE_SYMBOLS)
Expand Down Expand Up @@ -3561,10 +3583,6 @@ def _com_apple_xcode_tools_swift_compiler____SWIFT_ENFORCE_EXCLUSIVE_ACCESS_DEBU
# YES
return (False, "YES")

def _com_apple_xcode_tools_swift_compiler__SWIFT_SWIFT3_OBJC_INFERENCE__DefaultValue(xcconfigs, id_configs):
# Default
return (False, "Default")

def _com_apple_xcode_tools_swift_compiler__SWIFT_STDLIB__DefaultValue(xcconfigs, id_configs):
# swiftCore
return (False, "swiftCore")
Expand Down Expand Up @@ -4330,7 +4348,6 @@ XCSPEC_EVALS = {
"com_apple_xcode_tools_swift_compiler__SWIFT_SERIALIZE_DEBUGGING_OPTIONS__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_SERIALIZE_DEBUGGING_OPTIONS__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_STDLIB__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_STDLIB__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_SUPPRESS_WARNINGS__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_SUPPRESS_WARNINGS__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_SWIFT3_OBJC_INFERENCE__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_SWIFT3_OBJC_INFERENCE__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_TARGET_TRIPLE__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_TARGET_TRIPLE__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_THREAD_SANITIZER__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_THREAD_SANITIZER__DefaultValue,
"com_apple_xcode_tools_swift_compiler__SWIFT_TREAT_WARNINGS_AS_ERRORS__DefaultValue": _com_apple_xcode_tools_swift_compiler__SWIFT_TREAT_WARNINGS_AS_ERRORS__DefaultValue,
Expand Down
23 changes: 1 addition & 22 deletions data/xcspecs.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
############################################################################
# THIS IS GENERATED CODE #
# Extracted from Xcode 12.2 #
# Extracted from Xcode 12.5.1.12E507 #
# To update, in rules_ios run `bazel run data_generators:extract_xcspecs` #
############################################################################

Expand Down Expand Up @@ -2711,27 +2711,6 @@ SETTINGS = {
"DefaultValue": "com_apple_xcode_tools_swift_compiler____SWIFT_ENFORCE_EXCLUSIVE_ACCESS_DEBUG_ENFORCEMENT_DEBUG__DefaultValue",
"Type": "Boolean",
},
"SWIFT_SWIFT3_OBJC_INFERENCE": {
"Category": "Code Generation",
"CommandLineArgs": {
"Off": [
"-Xfrontend",
"-disable-swift3-objc-inference",
],
"On": [
"-Xfrontend",
"-enable-swift3-objc-inference",
"-Xfrontend",
"-warn-swift3-objc-inference-minimal",
],
},
"DefaultValue": "com_apple_xcode_tools_swift_compiler__SWIFT_SWIFT3_OBJC_INFERENCE__DefaultValue",
"Description": "Control how the Swift compiler infers @objc " +
"for declarations.",
"DisplayName": "Swift 3 @objc Inference",
"Type": "Enumeration",
"Values": ["Default", "On", "Off"],
},
"SWIFT_STDLIB": {
"DefaultValue": "com_apple_xcode_tools_swift_compiler__SWIFT_STDLIB__DefaultValue",
"Type": "String",
Expand Down

0 comments on commit 30a1cf2

Please sign in to comment.