urbit/nix/nixcrpkgs/macos/clang_builder.sh
benjamin-tlon edd57d380d
Finish cc-release cross-compilation. (#1202)
- Fixes the IPC bug
- Fixes the terminfo bug
- Moves the OSX SDK out of our nixcrpkgs fork.
- Vendor nixcrpkgs instead of having it be a submodule.
2019-04-23 19:50:38 -07:00

31 lines
478 B
Bash

source $setup
tar -xf $llvm_src
mv llvm-* llvm
tar -xf $lld_src
mv lld-* lld
mv lld llvm/tools/
tar -xf $src
mv cfe-* clang
cd clang
for patch in $patches; do
echo applying patch $patch
patch -p1 -i $patch
done
cd ..
mv clang llvm/projects/
mkdir build
cd build
cmake ../llvm -GNinja -DDEFAULT_SYSROOT=$out -DCMAKE_INSTALL_PREFIX=$out $cmake_flags
ninja
ninja install
# clang-tblgen is supposed to be an internal tool, but tapi needs it
cp bin/clang-tblgen $out/bin