From 8de5e1a2aeab8903b4eb72a378fd3503ee74e2fb Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Wed, 25 Nov 2020 01:00:28 +0000 Subject: [PATCH] Move all LLVM files to /build/llvm --- .github/workflows/llvm.yml | 2 +- .gitignore | 4 ++-- build/Helpers.lua | 1 - build/LLVM.lua | 8 ++++---- build/{ => llvm}/LLVM-commit | 0 build/{scripts => llvm}/LLVM.lua | 8 ++++---- build/scripts/Provision.lua | 2 +- docs/LLVM.md | 10 +++++----- 8 files changed, 17 insertions(+), 18 deletions(-) rename build/{ => llvm}/LLVM-commit (100%) rename build/{scripts => llvm}/LLVM.lua (98%) diff --git a/.github/workflows/llvm.yml b/.github/workflows/llvm.yml index 26f616f5..dae93dd6 100644 --- a/.github/workflows/llvm.yml +++ b/.github/workflows/llvm.yml @@ -62,4 +62,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: llvm - path: build/scripts/llvm-*-*.* \ No newline at end of file + path: build/llvm/llvm-*-*.* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8a824273..d6b32765 100644 --- a/.gitignore +++ b/.gitignore @@ -35,8 +35,8 @@ src/generator/generator *DesignTime* *TemporaryGeneratedFile* *FileListAbsolute* -/build/scripts/llvm** -/build/scripts/*.tar.gz +/build/llvm/llvm-* +/build/llvm/*.tar.gz /build/scripts/.vagrant /build/*.zip /build/*.pkg diff --git a/build/Helpers.lua b/build/Helpers.lua index 7e734553..568d9ec3 100644 --- a/build/Helpers.lua +++ b/build/Helpers.lua @@ -39,7 +39,6 @@ newoption { } rootdir = path.getabsolute("../") -depsdir = path.join(rootdir, "deps"); srcdir = path.join(rootdir, "src"); incdir = path.join(rootdir, "include"); examplesdir = path.join(rootdir, "examples"); diff --git a/build/LLVM.lua b/build/LLVM.lua index 06382a3a..373e41ee 100644 --- a/build/LLVM.lua +++ b/build/LLVM.lua @@ -1,17 +1,17 @@ -- Setup the LLVM dependency directories -LLVMRootDir = depsdir .. "/llvm/" +LLVMRootDir = builddir .. "/llvm/llvm-project" local LLVMDirPerConfiguration = false local LLVMRootDirDebug = "" local LLVMRootDirRelease = "" -require "scripts/LLVM" +require "llvm/LLVM" function SearchLLVM() - LLVMRootDirDebug = builddir .. "/scripts/" .. get_llvm_package_name(nil, "Debug") - LLVMRootDirRelease = builddir .. "/scripts/" .. get_llvm_package_name() + LLVMRootDirDebug = builddir .. "/llvm/" .. get_llvm_package_name(nil, "Debug") + LLVMRootDirRelease = builddir .. "/llvm/" .. get_llvm_package_name() if os.isdir(LLVMRootDirDebug) or os.isdir(LLVMRootDirRelease) then LLVMDirPerConfiguration = true diff --git a/build/LLVM-commit b/build/llvm/LLVM-commit similarity index 100% rename from build/LLVM-commit rename to build/llvm/LLVM-commit diff --git a/build/scripts/LLVM.lua b/build/llvm/LLVM.lua similarity index 98% rename from build/scripts/LLVM.lua rename to build/llvm/LLVM.lua index 0249510e..b5b8de31 100644 --- a/build/scripts/LLVM.lua +++ b/build/llvm/LLVM.lua @@ -1,8 +1,8 @@ -require "Build" -require "Utils" +require "../scripts/Build" +require "../scripts/Utils" require "../Helpers" -local llvm = path.getabsolute(builddir .. "/../deps/llvm") +local llvm = path.getabsolute(builddir .. "/llvm/llvm-project") -- Prevent premake from inserting /usr/lib64 search path on linux. GCC does not need this path specified -- as compiler automatically knows where to look for system libs. Insertion of this path causes issues @@ -19,7 +19,7 @@ if is_vagrant() then end function get_llvm_rev() - return cat(builddir .. "/LLVM-commit") + return cat(builddir .. "/llvm/LLVM-commit") end function clone_llvm() diff --git a/build/scripts/Provision.lua b/build/scripts/Provision.lua index cffcf564..4dfaa726 100644 --- a/build/scripts/Provision.lua +++ b/build/scripts/Provision.lua @@ -57,7 +57,7 @@ end function restore_nuget_packages() local nugetexe = os.ishost("windows") and "NuGet.exe" or "mono ./NuGet.exe" - execute(nugetexe .. " restore packages.config -PackagesDirectory " .. depsdir) + execute(nugetexe .. " restore packages.config -PackagesDirectory " .. path.join(rootdir, "deps")) end local compile_llvm = is_vagrant() diff --git a/docs/LLVM.md b/docs/LLVM.md index 55f039be..4a3d625a 100644 --- a/docs/LLVM.md +++ b/docs/LLVM.md @@ -35,13 +35,13 @@ If using Visual Studio / MSVC, be sure to run the scripts from a [VS Command Pro ## Cloning from Git -1. Clone LLVM to `\deps\llvm` +1. Clone LLVM to `\build\llvm\llvm` ``` git clone http://llvm.org/git/llvm.git ``` -2. Clone Clang to `\deps\llvm\tools\clang` +2. Clone Clang to `\build\llvm\llvm\tools\clang` ``` cd llvm/tools @@ -54,7 +54,7 @@ Make sure to use the revisions specified below, or you will most likely get comp Required LLVM/Clang commits: -[LLVM: see /build/LLVM-commit.](https://github.com/mono/CppSharp/tree/master/build/LLVM-commit) +[LLVM: see /build/llvm/LLVM-commit.](https://github.com/mono/CppSharp/tree/master/build/LLVM-commit) [Clang: see /build/Clang-commit.](https://github.com/mono/CppSharp/tree/master/build/Clang-commit) @@ -74,8 +74,8 @@ cd \build ./build.sh download_llvm ``` -After this, you should end up with one or multiple /build/scripts/llvm--- folders +After this, you should end up with one or multiple /build/llvm/llvm--- folders containing the headers and libraries for LLVM. If you do not end up with the folder, which can happen due to, for instance, not having 7-Zip on the path on Windows, -then you can manually extract the .7z archives in /build/scripts to their respective folders. +then you can manually extract the .7z archives in /build/llvm to their respective folders.