Unverified Commit 6c858b32 authored by boklm's avatar boklm
Browse files

Update OSX Toolchain (doing changes similar to bug 18331)

Build cmake, clang, llvm for the OSX toolchain.
parent dee028a9
#!/bin/bash
set -e
tar xf [% project %]-[% c("version") %].tar.gz
mv [% project %]-[% c("version") %] [% project %]
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: r247539
git_url: https://github.com/llvm-mirror/clang
git_hash: 592b43b609b42cffd1531a700c140e10766bf049
filename: '[% project %]-src-[% c("version") %]-[% c("var/build_id") %].tar.gz'
#!/bin/bash
set -e
rootdir=$(pwd)
distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
./bootstrap --prefix=$distdir
make -j4
make install
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 2.8.12.2
git_url: https://cmake.org/cmake.git
git_hash: 'v[% c("version") %]'
tag_gpg_id: 1
gpg_keyring: cmake.gpg
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
remote_docker: 1
var:
deps:
- build-essential
input_files:
- project: docker-image
#!/bin/bash
set -e
rootdir=$(pwd)
distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
export PATH="/var/tmp/dist/cmake/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") %]
export LLVM_HOME=$(pwd)
tar -C $LLVM_HOME/tools -xf $rootdir/[% c('input_files_by_name/clang') %]
mkdir build
cd build
cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir -DCMAKE_BUILD_TYPE:STRING=Release $LLVM_HOME
make -j4
make install
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: 8f188e0ea735ac9383a65a0d1c846eb790c2ec74
git_url: https://github.com/llvm-mirror/llvm
git_hash: '[% c("version") %]'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
remote_docker: 1
var:
deps:
- build-essential
- python
input_files:
- project: docker-image
- project: cmake
name: cmake
- project: clang
name: clang
......@@ -5,8 +5,12 @@ distdir="$rootdir/dist/[% project %]"
mkdir -p "$distdir"
tar xzf [% c('input_files_by_name/SDK') %]
mv MacOSX10.7.sdk "$distdir/SDK"
tar xf [% c('input_files_by_name/clang') %]
mv x-tools "$distdir"
tar xf [% c('input_files_by_name/llvm') %]
mv llvm "$distdir/clang"
tar -C $distdir -xf [% c('input_files_by_name/cctools') %]
cd $distdir/cctools/bin
ln -s ../../clang/bin/clang x86_64-apple-darwin10-clang
ln -s ../../clang/bin/clang++ x86_64-apple-darwin10-clang++
cd "$rootdir/dist"
[% c('tar', {
tar_src => [ project ],
......
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %].tar.gz'
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
version: 10.7-1
var:
setup: |
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf [% c("compiler_tarfile") %]
export sysrootdir=/var/tmp/dist/[% project %]/SDK/
export ccbindir=/var/tmp/dist/[% project %]/x-tools/x86_64-apple-darwin10/bin
export PATH="$ccbindir:$PATH"
CFLAGS="-arch x86_64 -isysroot $sysrootdir"
CXXFLAGS="-arch x86_64 -isysroot $sysrootdir"
CC="$ccbindir/x86_64-apple-darwin10-clang $CFLAGS"
CXX="$ccbindir/x86_64-apple-darwin10-clang++ $CFLAGS"
RANLIB=$ccbindir/x86_64-apple-darwin10-ranlib
AR=$ccbindir/x86_64-apple-darwin10-ar
AS=$ccbindir/x86_64-apple-darwin10-as
LD=$ccbindir/x86_64-apple-darwin10-ld
STRIP=$ccbindir/x86_64-apple-darwin10-strip
export clangdir=/var/tmp/dist/[% project %]/clang/bin
export cctoolsdir=/var/tmp/dist/[% project %]/cctools/bin
export PATH="$clangdir:$cctoolsdir:$PATH"
export LD_LIBRARY_PATH=/var/tmp/dist/[% project %]/clang/lib
CFLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $$cctoolsdir -isysroot $sysrootdir"
CXXFLAGS="$CFLAGS"
CC="$clangdir/clang $CFLAGS"
CXX="$clangdir/clang++ $CXXFLAGS"
RANLIB=$cctoolsdir/x86_64-apple-darwin10-ranlib
AR=$cctoolsdir/x86_64-apple-darwin10-ar
AS=$cctoolsdir/x86_64-apple-darwin10-as
LD=$cctoolsdir/x86_64-apple-darwin10-ld
STRIP=$cctoolsdir/x86_64-apple-darwin10-strip
input_files:
- name: clang
URL: https://people.torproject.org/~mikeperry/mirrors/sources/x86_64-apple-darwin10.tar.xz
sha256sum: 7b71bfe02820409b994c5c33a7eab81a81c72550f5da85ff7af70da3da244645
- name: llvm
project: llvm
- name: cctools
URL: https://people.torproject.org/~gk/mirrors/sources/cctools.tar.gz
sha256sum: e908fdebc2886ee5491ebfc7e7950af451b3c4e2439c2d7a923ed06ad05113e4
- name: SDK
URL: https://people.torproject.org/~mikeperry/mirrors/sources/MacOSX10.7.sdk.tar.gz
sha256sum: da77bb0003fcca5ea8c4e8cb2da8828ded750c54afdcac29ec6f3b46ad5e3adf
......@@ -54,7 +54,7 @@ targets:
LDFLAGS: '-specs=/var/tmp/dist/mingw-w64/msvcr100.spec -mwindows -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$gcclibs'
compiler: mingw-w64
osx-x86_64:
distribution: Ubuntu-12.04
distribution: Debian-7.11
arch: x86_64
var:
osx: 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment