[tbb-commits] [tor-browser-build/master] Bug 9711: Build own cctools for macOS cross-compilation

boklm at torproject.org boklm at torproject.org
Fri Jun 1 10:54:06 UTC 2018


commit 94b31b1822961b25fec66078bcf48a279d6e9aa6
Author: Georg Koppen <gk at torproject.org>
Date:   Mon May 21 14:13:40 2018 +0000

    Bug 9711: Build own cctools for macOS cross-compilation
---
 projects/cctools/build  | 24 ++++++++++++++++++++++++
 projects/cctools/config | 16 ++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/projects/cctools/build b/projects/cctools/build
new file mode 100644
index 0000000..cad9e3a
--- /dev/null
+++ b/projects/cctools/build
@@ -0,0 +1,24 @@
+#!/bin/bash
+[% c("var/set_default_env") -%]
+distdir=/var/tmp/dist/[% project %]
+mkdir -p /var/tmp/dist
+tar -C /var/tmp/dist -xf [% c('input_files_by_name/llvm') %]
+export PATH="/var/tmp/dist/llvm/bin:$PATH"
+mkdir -p /var/tmp/build
+tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
+cd /var/tmp/build/[% project %]-[% c('version') %]/cctools
+
+export CC=clang
+export CXX=clang++
+./autogen.sh
+./configure --prefix=$distdir --target=x86_64-apple-darwin11 --with-llvm-config=llvm-config
+export LDFLAGS=-lpthread
+
+make -j[% c("buildconf/num_procs") %] install
+
+cd /var/tmp/dist
+[% c('tar', {
+        tar_src => [ project ],
+        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
+    }) %]
+
diff --git a/projects/cctools/config b/projects/cctools/config
new file mode 100644
index 0000000..cb84ec4
--- /dev/null
+++ b/projects/cctools/config
@@ -0,0 +1,16 @@
+# vim: filetype=yaml sw=2
+filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
+version: '[% c("abbrev") %]'
+# This can be found in
+# browser/config/tooltool-manifest/macosx64/clang.manifest
+git_hash: 8e9c3f2506b51cf56725eaa60b6e90e240e249ca
+git_url: https://github.com/tpoechtrager/cctools-port
+
+var:
+  container:
+    use_container: 1
+
+input_files:
+  - project: container-image
+  - name: llvm
+    project: llvm





More information about the tbb-commits mailing list