Commit e8574bbd authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 32437: Add wasi-sysroot project for RLBox

parent 02ad765b
#!/bin/bash
[% c("var/set_default_env") -%]
distdir=/var/tmp/dist/[% project %]
[% IF c("var/linux") %]
[% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
hardened_gcc => 0 }) %]
[% END -%]
[% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
mkdir /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]
./configure.py --bootstrap
mkdir $distdir
cp ninja $distdir
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
git_url: https://github.com/ninja-build/ninja.git
git_hash: b25c08bda4949192c69cea4cee057887341a2ffc #v1.9.0
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
var:
container:
use_container: 1
input_files:
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
enable: '[% c("var/linux") %]'
- name: python
project: python
#!/bin/bash
[% c("var/set_default_env") -%]
# We need a link to our GCC, otherwise the system cc gets used which points to
# /usr/bin/gcc.
[% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
hardened_gcc => 0 }) %]
ln -s gcc /var/tmp/dist/gcc/bin/cc
distdir=/var/tmp/dist
builddir=/var/tmp/build/[% project %]
mkdir -p $distdir
tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
export PATH=/var/tmp/dist/binutils/bin:/var/tmp/dist/cmake/bin:/var/tmp/dist/ninja:$PATH
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
cd $builddir
# We have no .git in our tar ball but the Makefile depends on that. Just
# hard-code the version for now.
patch -p1 < $rootdir/no-git.patch
make -j[% c("buildconf/num_procs") %] PREFIX=$distdir/[% project %]
cd $distdir
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
version: '[% c("abbrev") %]'
git_hash: 87b7a019472770f08d49cf3b558867dc76ea74eb
git_url: https://github.com/CraneStation/wasi-sdk
git_submodule: 1
var:
container:
use_container: 1
targets:
linux:
var:
arch_deps:
- patch
input_files:
- project: container-image
- name: gcc
project: gcc
- name: binutils
project: binutils
- name: cmake
project: cmake
- name: ninja
project: ninja
- filename: no-git.patch
From 55a106779cd012f9cf5d6f46a7a3523de9ba93c3 Mon Sep 17 00:00:00 2001
From: Georg Koppen <gk@torproject.org>
Date: Sat, 7 Dec 2019 16:12:42 +0000
Subject: [PATCH] No .git in our tarball
diff --git a/Makefile b/Makefile
index f09a901..dc114cb 100644
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,11 @@ LLVM_PROJ_DIR?=$(ROOT_DIR)/src/llvm-project
PREFIX?=/opt/wasi-sdk
CLANG_VERSION=$(shell ./llvm_version.sh $(LLVM_PROJ_DIR))
-VERSION:=$(shell ./version.sh)
-DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)
+#VERSION:=$(shell ./version.sh)
+DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v8.1g5225b05436ce
default: build
- @echo "Use -fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)"
+ @echo "Use -fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v8.1g5225b05436ce"
clean:
rm -rf build $(PREFIX)
--
2.24.0
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