Skip to content

Commit

Permalink
Merge pull request rust-lang#18 from ids1024/llvm
Browse files Browse the repository at this point in the history
[WIP] [incomplete] LLVM
  • Loading branch information
jackpot51 authored Jun 9, 2017
2 parents bfeccc3 + 0879993 commit ced889e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
20 changes: 20 additions & 0 deletions ports/environ.sh
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,23 @@ function autogen_template {
;;
esac
}

function cmake_template {
case $1 in
cmake)
mkdir -p "${BUILD}/${DIR}/${MAKE_DIR}"
pushd "${BUILD}/${DIR}/${MAKE_DIR}"
cmake "${CMAKE_ARGS[@]}" ${BUILD}/${DIR}
popd
;;
add)
fetch_template add
cmake_template cmake
make_template build
make_template install
;;
*)
configure_template $*
;;
esac
}
10 changes: 5 additions & 5 deletions ports/llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ source environ.sh

BROKEN

GIT=https://github.com/redox-os/llvm.git
GIT_BRANCH=redox
GIT=https://github.com/ids1024/llvm.git
BRANCH=redox2
DIR=llvm

MAKE_DIR="build"
CONFIGURE="../configure"
CONFIGURE_ARGS="--host=${HOST} --target=${HOST} --enable-static --disable-shared --disable-dlopen --enable-targets=x86_64"
configure_template $*
CMAKE_ARGS=(-Wno-dev -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX="$PREFIX" -DLLVM_DEFAULT_TARGET_TRIPLE=$HOST -DLLVM_TARGET_ARCH=$ARCH -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_SYSTEM_NAME=Generic -DPYTHON_EXECUTABLE=/usr/bin/python2 -DUNIX=1 -DLLVM_ENABLE_THREADS=Off -DLLVM_INCLUDE_TESTS=OFF -target=$HOST --sysroot="$SYSROOT" -DLLVM_TABLEGEN=/usr/bin/llvm-tblgen -I${BUILD}/prefix/${HOST}/include -DCMAKE_CXX_FLAGS='--std=gnu++11' -LLVM_BUILD_TOOLS=OFF -DLLVM_TOOL_LTO_BUILD=Off -DLLVM_TOOL_LLVM_PROFDATA_BUILD=Off -DLLVM_TOOL_LLI_BUILD=Off -DLLVM_TOOL_RDOBJ_BUILD=Off -DLLVM_TOOL_LLVM_COV_BUILD=Off -DLLVM_TOOL_LLVM_XRAY_BUILD=Off -DLLVM_TOOL_LLVM_LTO2_BUILD=Off -DLLVM_TOOL_LLVM_LTO_BUILD=Off -DLLVM_TOOL_LLVM_RTDYLD_BUILD=Off)

cmake_template $*

0 comments on commit ced889e

Please sign in to comment.