Skip to content

Commit 1f73941

Browse files
aykevldeadprogram
authored andcommitted
ci: bump Xcode version to use macOS 10.14
The CircleCI macOS builds are failing, probably due to the old macOS version that's used. This version (10.13 High Sierra) isn't supported anymore on Homebrew so it seems best to me to simply bump the version. I picked Xcode 11.1.0 because 10.3.0 is somehow triggering an error while trying to install QEMU (the Python install fails). Because of this newer Xcode version, I had to add an extra flag (-isysroot) to the default command line for MacOS. The reason is that this newer Xcode version no longer stores header files in /usr/local, an SDK must be specified manually. With this change, the default SDK is used.
1 parent abeab51 commit 1f73941

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

.circleci/config.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -294,24 +294,24 @@ commands:
294294
variant: "macos"
295295
- restore_cache:
296296
keys:
297-
- go-cache-macos-v2-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
298-
- go-cache-macos-v2-{{ checksum "go.mod" }}
297+
- go-cache-macos-v3-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_PREVIOUS_BUILD_NUM }}
298+
- go-cache-macos-v3-{{ checksum "go.mod" }}
299299
- restore_cache:
300300
keys:
301-
- llvm-source-11-macos-v2
301+
- llvm-source-11-macos-v3
302302
- run:
303303
name: "Fetch LLVM source"
304304
command: make llvm-source
305305
- save_cache:
306-
key: llvm-source-11-macos-v2
306+
key: llvm-source-11-macos-v3
307307
paths:
308308
- llvm-project/clang/lib/Headers
309309
- llvm-project/clang/include
310310
- llvm-project/lld/include
311311
- llvm-project/llvm/include
312312
- restore_cache:
313313
keys:
314-
- llvm-build-11-macos-v3
314+
- llvm-build-11-macos-v4
315315
- run:
316316
name: "Build LLVM"
317317
command: |
@@ -327,17 +327,17 @@ commands:
327327
find llvm-build -name CMakeFiles -prune -exec rm -r '{}' \;
328328
fi
329329
- save_cache:
330-
key: llvm-build-11-macos-v3
330+
key: llvm-build-11-macos-v4
331331
paths:
332332
llvm-build
333333
- restore_cache:
334334
keys:
335-
- wasi-libc-sysroot-macos-v3
335+
- wasi-libc-sysroot-macos-v4
336336
- run:
337337
name: "Build wasi-libc"
338338
command: make wasi-libc
339339
- save_cache:
340-
key: wasi-libc-sysroot-macos-v3
340+
key: wasi-libc-sysroot-macos-v4
341341
paths:
342342
- lib/wasi-libc/sysroot
343343
- run:
@@ -359,7 +359,7 @@ commands:
359359
tinygo version
360360
- run: make smoketest AVR=0
361361
- save_cache:
362-
key: go-cache-macos-v2-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_BUILD_NUM }}
362+
key: go-cache-macos-v3-{{ checksum "go.mod" }}-{{ .Environment.CIRCLE_BUILD_NUM }}
363363
paths:
364364
- ~/.cache/go-build
365365
- /go/pkg/mod
@@ -401,7 +401,7 @@ jobs:
401401
- build-linux
402402
build-macos:
403403
macos:
404-
xcode: "10.1.0"
404+
xcode: "11.1.0" # macOS 10.14
405405
steps:
406406
- build-macos
407407

compileopts/target.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
249249
PortReset: "false",
250250
}
251251
if goos == "darwin" {
252+
spec.CFlags = append(spec.CFlags, "-isysroot", "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
252253
spec.LDFlags = append(spec.LDFlags, "-Wl,-dead_strip")
253254
} else {
254255
spec.LDFlags = append(spec.LDFlags, "-no-pie", "-Wl,--gc-sections") // WARNING: clang < 5.0 requires -nopie

0 commit comments

Comments
 (0)