OLD | NEW |
(Empty) | |
| 1 # Mac and iOS hermetic toolchain instructions |
| 2 |
| 3 The following is a short explanation of why we use a the hermetic toolchain |
| 4 and instructions on how to roll a new toolchain. |
| 5 |
| 6 ## How to roll a new hermetic toolchain. |
| 7 |
| 8 1. Download a new version of Xcode, and confirm either mac or ios builds |
| 9 properly with this new version. |
| 10 |
| 11 2. Run the following command: |
| 12 |
| 13 ``` |
| 14 src/build/package_mac_toolchain.py /path/to/Xcode.app/ [ios|mac] |
| 15 ``` |
| 16 |
| 17 The script will create a subset of the toolchain necessary for a build, and |
| 18 upload them to be used by hermetic builds. |
| 19 |
| 20 If for some reason this toolchain version has already been uploaded, the |
| 21 script will ask if we should create sub revision. This can be necessary when |
| 22 the package script has been updated to compress additional files. |
| 23 |
| 24 2. Create a CL with updated [MAC|IOS]_TOOLCHAIN_VERSION and _SUB_REVISION in |
| 25 src/build/mac_toolchain.py with the version created by the previous command. |
| 26 |
| 27 3. Run the CL thru the trybots to confirm the roll works. |
| 28 |
| 29 ## Why we use a hermetic toolchain. |
| 30 |
| 31 Building Chrome Mac currently requires many binaries that come bundled with |
| 32 Xcode, as well the macOS and iphoneOS SDK [also bundled with Xcode]. Note that |
| 33 Chrome ships its own version of clang [compiler], but is dependent on Xcode |
| 34 for these other binaries. |
| 35 |
| 36 Chrome should be built against the latest SDK available, but historically, |
| 37 updating the SDK has been nontrivially difficult. Additionally, bot system |
| 38 installs can range from Xcode 5 on some bots, to the latest and |
| 39 greatest. Using a hermetic toolchain has two main benefits: |
| 40 |
| 41 1. Build Chrome with a well-defined toolchain [rather than whatever happens to |
| 42 be installed on the machine]. |
| 43 |
| 44 2. Easily roll/update the toolchain. |
OLD | NEW |