Browse Source

Remove dockerfiles for build llvm

These are no longer used, so they're probably broken. Besides, Docker
Desktop for Windows/Mac is no longer free.

Signed-off-by: Sean Young <sean@mess.org>
Sean Young 4 years ago
parent
commit
062ecabb87
3 changed files with 0 additions and 96 deletions
  1. 0 20
      build/build-llvm-linux.dockerfile
  2. 0 68
      build/build-llvm-windows.dockerfile
  3. 0 8
      docs/installing.rst

+ 0 - 20
build/build-llvm-linux.dockerfile

@@ -1,20 +0,0 @@
-FROM ubuntu:20.04
-
-ENV DEBIAN_FRONTEND=noninteractive
-RUN apt-get update -y
-RUN apt-get upgrade -y
-RUN apt-get install -y libz-dev pkg-config libssl-dev git cmake ninja-build gcc g++ python3
-
-RUN git clone --single-branch --branch solana-rustc/12.0-2021-04-15 \
-    https://github.com/solana-labs/llvm-project.git
-
-WORKDIR /llvm-project
-
-RUN cmake -G Ninja -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_TERMINFO=Off \
-    -DLLVM_ENABLE_PROJECTS=clang\;lld  \
-    -DLLVM_TARGETS_TO_BUILD=WebAssembly\;BPF \
-    -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=/llvm12.0 llvm
-
-RUN cmake --build . --target install
-
-RUN tar Jcf /llvm12.0-linux.tar.xz /llvm12.0/

+ 0 - 68
build/build-llvm-windows.dockerfile

@@ -1,68 +0,0 @@
-# escape=`
-
-# Use the latest Windows Server Core image
-FROM mcr.microsoft.com/windows/servercore:ltsc2019
-
-SHELL [ "powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'Continue'; $verbosePreference='Continue';"]
-
-# Download Visual Studio Build Tools 16.8.3. This should match the version on github actions virtual environment.
-# https://docs.microsoft.com/en-us/visualstudio/releases/2019/history
-# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
-ADD https://download.visualstudio.microsoft.com/download/pr/9b3476ff-6d0a-4ff8-956d-270147f21cd4/0df5becfebf4ae2418f5fae653feebf3888b0af00d3df0415cb64875147e9be3/vs_BuildTools.exe C:\TEMP\vs_buildtools.exe
-
-# Install Visual Studio Build Tools
-RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
-	--installPath C:\BuildTools `
-	--add Microsoft.VisualStudio.Component.VC.CMake.Project `
-	--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 `
-	--add Microsoft.VisualStudio.Component.VC.ATL `
-	--add Microsoft.VisualStudio.Component.Windows10SDK.18362
-
-# Rust
-ADD https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe C:\TEMP\rustup-init.exe
-
-RUN C:\TEMP\rustup-init.exe -y
-
-# Git
-ADD https://github.com/git-for-windows/git/releases/download/v2.30.0.windows.1/MinGit-2.30.0-64-bit.zip C:\TEMP\MinGit-2.30.0-64-bit.zip
-
-RUN Expand-Archive C:\TEMP\MinGit-2.30.0-64-bit.zip -DestinationPath c:\MinGit
-
-# LLVM Build requires Python
-# Newer versions than v3.5.4 fail due to https://github.com/microsoft/vcpkg/issues/6988
-ADD https://www.python.org/ftp/python/3.5.4/python-3.5.4-embed-amd64.zip C:\TEMP\python-3.5.4-embed-amd64.zip
-
-RUN Expand-Archive C:\TEMP\python-3.5.4-embed-amd64.zip -DestinationPath c:\Python
-
-# PowerShell community extensions needed for Invoke-BatchFile
-# Update Compress-Archive so that slashes are used: https://github.com/PowerShell/Microsoft.PowerShell.Archive/issues/71
-RUN Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ; `
-	Install-Module -name Pscx -Scope CurrentUser -Force -AllowClobber ; `
-	Install-Module -name Microsoft.PowerShell.Archive -MinimumVersion 1.2.3.0 -Repository PSGallery -Force -AllowClobber
-
-# Invoke-BatchFile retains the environment after executing so we can set it up more permanently
-RUN Invoke-BatchFile C:\BuildTools\vc\Auxiliary\Build\vcvars64.bat ; `
-	$path = $env:path + ';c:\MinGit\cmd;C:\Users\ContainerAdministrator\.cargo\bin;C:\llvm12.0\bin;C:\Python' ; `
-	Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path ; `
-	Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name LIB -Value $env:LIB ; `
-	Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name INCLUDE -Value $env:INCLUDE ; `
-	Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name LIBPATH -Value $env:LIBPATH ;
-
-RUN git clone --single-branch https://github.com/solana-labs/llvm-project --branch solana-rustc/12.0-2021-04-15
-
-WORKDIR \llvm-project
-
-# Stop cmake from re-generating build system ad infinitum
-RUN Add-Content llvm\CMakeLists.txt 'set(CMAKE_SUPPRESS_REGENERATION 1)' ;
-
-# All llvm targets should be enabled or inkwell refused to link
-RUN cmake -G Ninja -DLLVM_ENABLE_ASSERTIONS=On '-DLLVM_ENABLE_PROJECTS=clang;lld' `
-	-DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=C:/llvm12.0 `
-	-B build llvm
-RUN cmake --build build --target install
-
-WORKDIR \
-
-RUN Compress-Archive -Path C:\llvm12.0 -DestinationPath C:\llvm12.0-win.zip
-
-RUN Remove-Item -Path \llvm-project,C:\TEMP -Recurse -Force

+ 0 - 8
docs/installing.rst

@@ -96,14 +96,6 @@ After unzipping the file, add the bin directory to your path.
 
 	set PATH=%PATH%;C:\llvm12.0\bin
 
-You can use docker for windows to build your own llvm from source. There is
-`dockerfile for building llvm on Windows <https://github.com/hyperledger-labs/solang/blob/main/build/build-llvm-windows.dockerfile>`_.
-This will need `Docker Desktop <https://www.docker.com/products/docker-desktop>`_ installed, and then switched to
-`windows containers <https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers>`_.
-The result will be an image with llvm compressed in the file ``c:\llvm12.0-win.zip``. Docker on Windows needs Hyper-V
-enabled. If you are running Windows 10 in a virtual machine, be sure to check
-`this blog post <https://www.mess.org/2020/06/22/Hyper-V-in-KVM/>`_.
-
 Installing LLVM on Mac
 ______________________