Browse Source

Move all LLVM files to /build/llvm

pull/1529/head
josetr 5 years ago
parent
commit
8de5e1a2ae
  1. 2
      .github/workflows/llvm.yml
  2. 4
      .gitignore
  3. 1
      build/Helpers.lua
  4. 8
      build/LLVM.lua
  5. 0
      build/llvm/LLVM-commit
  6. 8
      build/llvm/LLVM.lua
  7. 2
      build/scripts/Provision.lua
  8. 10
      docs/LLVM.md

2
.github/workflows/llvm.yml

@ -62,4 +62,4 @@ jobs: @@ -62,4 +62,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: llvm
path: build/scripts/llvm-*-*.*
path: build/llvm/llvm-*-*.*

4
.gitignore vendored

@ -35,8 +35,8 @@ src/generator/generator @@ -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

1
build/Helpers.lua

@ -39,7 +39,6 @@ newoption { @@ -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");

8
build/LLVM.lua

@ -1,17 +1,17 @@ @@ -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

0
build/LLVM-commit → build/llvm/LLVM-commit

8
build/scripts/LLVM.lua → build/llvm/LLVM.lua

@ -1,8 +1,8 @@ @@ -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 @@ -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()

2
build/scripts/Provision.lua

@ -57,7 +57,7 @@ end @@ -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()

10
docs/LLVM.md

@ -35,13 +35,13 @@ If using Visual Studio / MSVC, be sure to run the scripts from a [VS Command Pro @@ -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 `<CppSharp>\deps\llvm`
1. Clone LLVM to `<CppSharp>\build\llvm\llvm`
```
git clone http://llvm.org/git/llvm.git
```
2. Clone Clang to `<CppSharp>\deps\llvm\tools\clang`
2. Clone Clang to `<CppSharp>\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 @@ -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 <CppSharp>\build @@ -74,8 +74,8 @@ cd <CppSharp>\build
./build.sh download_llvm
```
After this, you should end up with one or multiple <CppSharp>/build/scripts/llvm-<revision>-<os>-<configuration> folders
After this, you should end up with one or multiple <CppSharp>/build/llvm/llvm-<revision>-<os>-<configuration> 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 <CppSharp>/build/scripts to their respective folders.
then you can manually extract the .7z archives in <CppSharp>/build/llvm to their respective folders.

Loading…
Cancel
Save