Use the 10.12 SDK to build clang 11 for Mac
Categories
(Firefox Build System :: Toolchains, task, P3)
Tracking
(firefox80 fixed)
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: away, Assigned: away)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
Building LLVM 11 for Mac will require SDK 10.12.
Ted had already attempted the SDK upgrade in bug 1324892 but was blocked by bug 1324892 comment 27, so he settled for 10.11 at the time.
I believe that issue is now resolved. In fact, Ted's 10.12 tooltool package still exists, and it seems to work fine for me on try.
Updated•5 years ago
|
LLVM 11 introduces a hard requirement for SDK 10.12 in order to build for Mac. Ted did some initial experiments with 10.12 in bug 1324892 and his tooltool package still exists on the server, so I've re-used it.
Note that this patch does not affect which SDK we use to build Firefox.
Updated•5 years ago
|
When we move from the 10.11 SDK to 10.12, the defined(COPYFILE_CLONE) in https://github.com/llvm/llvm-project/blob/d7ea6ce809a4413afb1edafa17ba291b39129f52/llvm/lib/Support/Unix/Path.inc#L1290 activates, and LLVM takes a dependency on __isOSVersionAtLeast which powers __builtin_available.
It is not super clear why this happens or what to do about it. Web searches have led to various reports of this problem in other projects, but their solutions don't apply to our codebase. At this point all I can say is that setting -U seems to get around the problem.
Updated•5 years ago
|
Per glandium's suggestion, to break the chicken and egg cycle we'll use 10.12 only for clang 11+ builds, and build macosx64-clang-trunk using macosx64-clang-9.
Updated•5 years ago
|
Currently the macosx-cross toolchain build pulls in a linux64-clang toolchain, uses it to build a Mac native toolchain, and then clobbers the result with pieces of the Linux toolchain. This means that the same version of LLVM is used to build the Mac pieces and be part of the final artifact. This will become a problem with upcoming LLVM 11 where we'll want to build the Mac pieces with LLVM 9 but otherwise repackage an LLVM 11 Linux toolchain.
So this commit makes the macosx-cross workflow look more like the win-cross one: take two compilers built elsewhere and just merge them.
Comment 6•5 years ago
|
||
| bugherder | ||
Comment 8•5 years ago
|
||
| bugherder | ||
Description
•