Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
darktears committed Aug 9, 2016
0 parents commit cf0ee3a
Show file tree
Hide file tree
Showing 1,731 changed files with 804,513 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Icecream Setup for macOS to build Chromium

This instructions shows how to use icecream on macOS to distribute build jobs on Linux nodes in the network.
Right now it does not explain how to share the build jobs on other macOS machines in the network.

## Instructions on macOS

Install the prerequisites (I recommend using homebrew)

```bash
$ xcode-select --install
$ brew install lzo
```

Clone this repository, this will take a while because it contains a binary copy
of a clang toolchain (which is a gross thing to keep in git, I know)

```bash
$ git clone https://github.com/darktears/icecream-mac.git /path/to/chromium/src/icecream
```

Install the daemon. This will create a launchd plist which will be run on startup.
The argument passed to the `install.sh` script is the scheduler to connect to.

```bash
$ sudo /path/to/chromium/src/icecream/install.sh IP_OF_SCHEDULER
```
You can uninstall it with :
```bash
$ sudo /path/to/chromium/src/icecream/uninstall.sh
```
With this the icecream daemon is launched when macOS starts or if it stops.

You now need to setup some environment variable. In your .bashrc add :

```bash
$ export ICECC_VERSION=/path/to/chromium/src/icecream/clang_darwin_on_linux.tar.gz
$ export ICECC_CLANG_REMOTE_CPP=1
```

Setup your args.gn

gn args gen /my/build

and add :
```bash
disable_precompiled_headers = true
clang_base_path = "//icecream"
clang_use_chrome_plugins = false
```

## Setup the Linux nodes

At the moment you need a custom version of icecream to be able to build the jobs sent from macOS. This is so that icecream
can handle compiling ObjectiveC files.

```bash
$ git clone https://github.com/darktears/icecream.git
$ cd icecream
$ ./autogen.sh
$ ./configure --prefix=/where/you/want/to/install
$ make && make install
```

If you're using a Debian-based distro, or basically any distro that uses sysv rc files to start iceccd and reads icecc.conf to configure the daemon, you can tell it to use your iceccd binary instead of the system-wide one. As root:

Stop iceccd if it's running. > sudo service iceccd stop
Edit icecc.conf and add a line like this: DAEMON="/path/to/your/new/iceccd"
Restart iceccd. > sudo service iceccd start

That's it.
8 changes: 8 additions & 0 deletions bin/c++
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Get the current working directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export ICECC_VERSION="x86_64:$DIR/clang_darwin_on_linux.tar.gz"
"$DIR/icecc/icecc" "$DIR/clang_darwin_on_darwin/bin/clang++" -mmacosx-version-min=10.11 $*
exit $?
8 changes: 8 additions & 0 deletions bin/cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Get the current working directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export ICECC_VERSION="x86_64:$DIR/clang_darwin_on_linux.tar.gz"
"$DIR/icecc/icecc" "$DIR/clang_darwin_on_darwin/bin/clang" -mmacosx-version-min=10.11 $*
exit $?
8 changes: 8 additions & 0 deletions bin/clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# Get the current working directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

export ICECC_VERSION="x86_64:$DIR/clang_darwin_on_linux.tar.gz"
"$DIR/icecc/icecc" "$DIR/clang_darwin_on_darwin/bin/clang" -mmacosx-version-min=10.11 $*
exit $?
Loading

0 comments on commit cf0ee3a

Please sign in to comment.