Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9980661

Browse files
committed
Update XCode
Chromium now requires the 10.15 SDK (https://bugs.chromium.org/p/chromium/issues/detail?id=1023913), which breaks the CommandBuffer bot because it's trying to compile with XCode 10.3, which provides the 10.14 SDK. What's worse, due to reasons I don't fully understand, after failing to compile CommandBuffer due to the dependence on the 10.15 SDK, the ninja out dir is poisoned for future compiles that don't depend on the 10.15 SDK. Also includes a code snippet from https://skia-review.googlesource.com/c/skia/+/264429 to find the xSAN dylibs. Change-Id: I3cd7661a5ea984ea6899e7a5e8cf878581538d9e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272736 Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
1 parent d1c90e1 commit 9980661

8 files changed

+62
-47
lines changed

infra/bots/recipe_modules/build/default.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,6 @@
66
from . import util
77

88

9-
# XCode build is listed in parentheses after the version at
10-
# https://developer.apple.com/news/releases/, or on Wikipedia here:
11-
# https://en.wikipedia.org/wiki/Xcode#Version_comparison_table
12-
# Use lowercase letters.
13-
# When updating XCODE_BUILD_VERSION, you will also need to update
14-
# XCODE_CLANG_VERSION.
15-
XCODE_BUILD_VERSION = '10g8'
16-
# Wikipedia lists the Clang version here:
17-
# https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
18-
XCODE_CLANG_VERSION = '10.0.1'
19-
20-
219
def build_command_buffer(api, chrome_dir, skia_dir, out):
2210
api.run(api.python, 'build command_buffer',
2311
script=skia_dir.join('tools', 'build_command_buffer.py'),
@@ -103,6 +91,11 @@ def compile_fn(api, checkout_root, out_dir):
10391
env = {}
10492

10593
if os == 'Mac':
94+
# XCode build is listed in parentheses after the version at
95+
# https://developer.apple.com/news/releases/, or on Wikipedia here:
96+
# https://en.wikipedia.org/wiki/Xcode#Version_comparison_table
97+
# Use lowercase letters.
98+
XCODE_BUILD_VERSION = '11c29'
10699
extra_cflags.append(
107100
'-DDUMMY_xcode_build_version=%s' % XCODE_BUILD_VERSION)
108101
mac_toolchain_cmd = api.vars.slave_dir.join(
@@ -365,13 +358,18 @@ def copy_build_products(api, src, dst):
365358
util.DEFAULT_BUILD_PRODUCTS)
366359

367360
if os == 'Mac' and any('SAN' in t for t in extra_tokens):
368-
# Hardcoding this path because it should only change when we upgrade to a
369-
# new Xcode.
370-
lib_dir = api.vars.cache_dir.join(
371-
'Xcode.app', 'Contents', 'Developer', 'Toolchains',
372-
'XcodeDefault.xctoolchain', 'usr', 'lib', 'clang', XCODE_CLANG_VERSION,
373-
'lib', 'darwin')
374-
dylibs = api.file.glob_paths('find xSAN dylibs', lib_dir,
361+
# The XSAN dylibs are in
362+
# Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
363+
# /clang/11.0.0/lib/darwin, where 11.0.0 could change in future versions.
364+
xcode_clang_ver_dirs = api.file.listdir(
365+
'find XCode Clang version',
366+
api.vars.cache_dir.join(
367+
'Xcode.app', 'Contents', 'Developer', 'Toolchains',
368+
'XcodeDefault.xctoolchain', 'usr', 'lib', 'clang'),
369+
test_data=['11.0.0'])
370+
assert len(xcode_clang_ver_dirs) == 1
371+
dylib_dir = xcode_clang_ver_dirs[0].join('lib', 'darwin')
372+
dylibs = api.file.glob_paths('find xSAN dylibs', dylib_dir,
375373
'libclang_rt.*san_osx_dynamic.dylib',
376374
test_data=[
377375
'libclang_rt.asan_osx_dynamic.dylib',

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm-Debug-iOS.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -70,7 +70,7 @@
7070
"[START_DIR]/cache/work/skia/bin/gn",
7171
"gen",
7272
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-arm-Debug-iOS/Debug",
73-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] skia_ios_identity=\".*GS9WA.*\" skia_ios_profile=\"[START_DIR]/provisioning_profile_ios/Upstream_Testing_Provisioning_Profile.mobileprovision\" target_cpu=\"arm\" target_os=\"ios\" werror=true"
73+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_ios_identity=\".*GS9WA.*\" skia_ios_profile=\"[START_DIR]/provisioning_profile_ios/Upstream_Testing_Provisioning_Profile.mobileprovision\" target_cpu=\"arm\" target_os=\"ios\" werror=true"
7474
],
7575
"cwd": "[START_DIR]/cache/work/skia",
7676
"env": {

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-iOS.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -70,7 +70,7 @@
7070
"[START_DIR]/cache/work/skia/bin/gn",
7171
"gen",
7272
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-arm64-Debug-iOS/Debug",
73-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] skia_ios_identity=\".*GS9WA.*\" skia_ios_profile=\"[START_DIR]/provisioning_profile_ios/Upstream_Testing_Provisioning_Profile.mobileprovision\" target_cpu=\"arm64\" target_os=\"ios\" werror=true"
73+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_ios_identity=\".*GS9WA.*\" skia_ios_profile=\"[START_DIR]/provisioning_profile_ios/Upstream_Testing_Provisioning_Profile.mobileprovision\" target_cpu=\"arm64\" target_os=\"ios\" werror=true"
7474
],
7575
"cwd": "[START_DIR]/cache/work/skia",
7676
"env": {

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-ASAN.json

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -70,7 +70,7 @@
7070
"[START_DIR]/cache/work/skia/bin/gn",
7171
"gen",
7272
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-ASAN/Debug",
73-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] sanitize=\"ASAN\" skia_enable_spirv_validation=false target_cpu=\"x86_64\" werror=true"
73+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] sanitize=\"ASAN\" skia_enable_spirv_validation=false target_cpu=\"x86_64\" werror=true"
7474
],
7575
"cwd": "[START_DIR]/cache/work/skia",
7676
"env": {
@@ -157,6 +157,23 @@
157157
"@@@STEP_LOG_END@python.inline@@@"
158158
]
159159
},
160+
{
161+
"cmd": [
162+
"vpython",
163+
"-u",
164+
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
165+
"--json-output",
166+
"/path/to/tmp/json",
167+
"listdir",
168+
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang"
169+
],
170+
"infra_step": true,
171+
"name": "find XCode Clang version",
172+
"~followup_annotations": [
173+
"@@@STEP_LOG_LINE@listdir@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0@@@",
174+
"@@@STEP_LOG_END@listdir@@@"
175+
]
176+
},
160177
{
161178
"cmd": [
162179
"vpython",
@@ -165,15 +182,15 @@
165182
"--json-output",
166183
"/path/to/tmp/json",
167184
"glob",
168-
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin",
185+
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin",
169186
"libclang_rt.*san_osx_dynamic.dylib"
170187
],
171188
"infra_step": true,
172189
"name": "find xSAN dylibs",
173190
"~followup_annotations": [
174-
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib@@@",
175-
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib@@@",
176-
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib@@@",
191+
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib@@@",
192+
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib@@@",
193+
"@@@STEP_LOG_LINE@glob@[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib@@@",
177194
"@@@STEP_LOG_END@glob@@@"
178195
]
179196
},
@@ -185,7 +202,7 @@
185202
"--json-output",
186203
"/path/to/tmp/json",
187204
"copy",
188-
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.asan_osx_dynamic.dylib",
205+
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib",
189206
"[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
190207
],
191208
"infra_step": true,
@@ -199,7 +216,7 @@
199216
"--json-output",
200217
"/path/to/tmp/json",
201218
"copy",
202-
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib",
219+
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib",
203220
"[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
204221
],
205222
"infra_step": true,
@@ -213,7 +230,7 @@
213230
"--json-output",
214231
"/path/to/tmp/json",
215232
"copy",
216-
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib",
233+
"[START_DIR]/cache/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib",
217234
"[START_DIR]/[SWARM_OUT_DIR]/out/Debug"
218235
],
219236
"infra_step": true,

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -91,7 +91,7 @@
9191
"[START_DIR]/cache/work/skia/bin/gn",
9292
"gen",
9393
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
94-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] skia_gl_standard=\"\" target_cpu=\"x86_64\" werror=true"
94+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_gl_standard=\"\" target_cpu=\"x86_64\" werror=true"
9595
],
9696
"cwd": "[START_DIR]/cache/work/skia",
9797
"env": {

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -70,7 +70,7 @@
7070
"[START_DIR]/cache/work/skia/bin/gn",
7171
"gen",
7272
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-Metal/Debug",
73-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] skia_use_metal=true target_cpu=\"x86_64\" werror=true"
73+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_use_metal=true target_cpu=\"x86_64\" werror=true"
7474
],
7575
"cwd": "[START_DIR]/cache/work/skia",
7676
"env": {

infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"cmd": [],
44
"name": "ensure xcode",
55
"~followup_annotations": [
6-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
6+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
77
]
88
},
99
{
@@ -13,7 +13,7 @@
1313
"-kind",
1414
"ios",
1515
"-xcode-version",
16-
"10g8",
16+
"11c29",
1717
"-output-dir",
1818
"[START_DIR]/cache/Xcode.app"
1919
],
@@ -70,7 +70,7 @@
7070
"[START_DIR]/cache/work/skia/bin/gn",
7171
"gen",
7272
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Release-MoltenVK_Vulkan/Release",
73-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_moltenvk_path=\"[START_DIR]/moltenvk\" skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
73+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\"] is_debug=false skia_enable_vulkan_debug_layers=true skia_moltenvk_path=\"[START_DIR]/moltenvk\" skia_use_vulkan=true target_cpu=\"x86_64\" werror=true"
7474
],
7575
"cwd": "[START_DIR]/cache/work/skia",
7676
"env": {

infra/bots/recipes/sync_and_compile.expected/Build-Mac-Clang-x86_64-Debug-CommandBuffer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"cmd": [],
157157
"name": "ensure xcode",
158158
"~followup_annotations": [
159-
"@@@STEP_TEXT@Ensuring Xcode version 10g8 in [START_DIR]/cache/Xcode.app@@@"
159+
"@@@STEP_TEXT@Ensuring Xcode version 11c29 in [START_DIR]/cache/Xcode.app@@@"
160160
]
161161
},
162162
{
@@ -166,7 +166,7 @@
166166
"-kind",
167167
"ios",
168168
"-xcode-version",
169-
"10g8",
169+
"11c29",
170170
"-output-dir",
171171
"[START_DIR]/cache/Xcode.app"
172172
],
@@ -244,7 +244,7 @@
244244
"[START_DIR]/cache/work/skia/bin/gn",
245245
"gen",
246246
"[START_DIR]/cache/work/skia/out/Build-Mac-Clang-x86_64-Debug-CommandBuffer/Debug",
247-
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=10g8\", \"-O1\"] skia_gl_standard=\"\" target_cpu=\"x86_64\" werror=true"
247+
"--args=cc=\"clang\" cc_wrapper=\"[START_DIR]/ccache_mac/bin/ccache\" cxx=\"clang++\" extra_cflags=[\"-DDUMMY_xcode_build_version=11c29\", \"-O1\"] skia_gl_standard=\"\" target_cpu=\"x86_64\" werror=true"
248248
],
249249
"cwd": "[START_DIR]/cache/work/skia",
250250
"env": {

0 commit comments

Comments
 (0)