Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active January 8, 2017 23:52
Show Gist options
  • Save Lewiscowles1986/fe05d794838bcb47e1ef12aa7c950bd8 to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/fe05d794838bcb47e1ef12aa7c950bd8 to your computer and use it in GitHub Desktop.
Compile Darwin Source Packages Xenial https://opensource.apple.com/tarballs/
#!/bin/bash
sudo apt-get install -y python build-essential cmake
sudo apt-get purge --auto-remove -y python3*
rm /usr/bin/python
ln -s /usr/bin/python2 /usr/bin/python
wget -q -nv https://opensource.apple.com/tarballs/llvmCore/llvmCore-3425.0.36.tar.gz
tar -xzvf llvmCore-3425.0.36.tar.gz
patch llvmCore-3425.0.36/CMakeLists.txt < /vagrant/CMakeLists.patch
mkdir -p llvmCore-3425.0.36/test && touch llvmCore-3425.0.36/test/CMakeLists.txt
wget -q -nv https://opensource.apple.com/tarballs/clang/clang-703.0.31.tar.gz
tar -xzvf clang-703.0.31.tar.gz --directory=./llvmCore-3425.0.36/tools/
mv ./llvmCore-3425.0.36/tools/clang-703.0.31 ./llvmCore-3425.0.36/tools/clang
cmake llvmCore-3425.0.36
cmake --build . --target all
echo 'All Done!'
Common subdirectories: llvmCore-3425.0.36/autoconf and llvm-core-orig/llvmCore-3425.0.36/autoconf
Common subdirectories: llvmCore-3425.0.36/bindings and llvm-core-orig/llvmCore-3425.0.36/bindings
Common subdirectories: llvmCore-3425.0.36/cmake and llvm-core-orig/llvmCore-3425.0.36/cmake
diff llvmCore-3425.0.36/CMakeLists.txt llvm-core-orig/llvmCore-3425.0.36/CMakeLists.txt
442,448c442,448
< add_lit_target(check-all
< "Running all regression tests"
< ${LLVM_LIT_TESTSUITES}
< PARAMS ${LLVM_LIT_PARAMS}
< DEPENDS ${LLVM_LIT_DEPENDS}
< ARGS ${LLVM_LIT_EXTRA_ARGS}
< )
---
> #add_lit_target(check-all
> # "Running all regression tests"
> # ${LLVM_LIT_TESTSUITES}
> # PARAMS ${LLVM_LIT_PARAMS}
> # DEPENDS ${LLVM_LIT_DEPENDS}
> # ARGS ${LLVM_LIT_EXTRA_ARGS}
> # )
Common subdirectories: llvmCore-3425.0.36/docs and llvm-core-orig/llvmCore-3425.0.36/docs
Common subdirectories: llvmCore-3425.0.36/examples and llvm-core-orig/llvmCore-3425.0.36/examples
Common subdirectories: llvmCore-3425.0.36/include and llvm-core-orig/llvmCore-3425.0.36/include
Common subdirectories: llvmCore-3425.0.36/lib and llvm-core-orig/llvmCore-3425.0.36/lib
Common subdirectories: llvmCore-3425.0.36/projects and llvm-core-orig/llvmCore-3425.0.36/projects
Common subdirectories: llvmCore-3425.0.36/runtime and llvm-core-orig/llvmCore-3425.0.36/runtime
Only in llvmCore-3425.0.36: test
Common subdirectories: llvmCore-3425.0.36/tools and llvm-core-orig/llvmCore-3425.0.36/tools
Common subdirectories: llvmCore-3425.0.36/unittests and llvm-core-orig/llvmCore-3425.0.36/unittests
Common subdirectories: llvmCore-3425.0.36/utils and llvm-core-orig/llvmCore-3425.0.36/utils
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
# vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "1024"
end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
apt-get update -qq
wget -q -nv https://gist.github.com/Lewiscowles1986/fe05d794838bcb47e1ef12aa7c950bd8/raw/c529878f37d6ef285d72ae95bb98ee5398975a9b/CMakeLists.patch
wget -q -nv https://gist.github.com/Lewiscowles1986/fe05d794838bcb47e1ef12aa7c950bd8/raw/6005dae62361eac0567b83bc032f9740728008b8/build.sh
mv CMakeLists.patch /vagrant/
mv build.sh /vagrant/
chmod +x /vagrant/build.sh
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment