diff --git a/programming/build/llvm/actions.py b/programming/build/llvm/actions.py
index c75f2ee2b1..808ce37bb2 100755
--- a/programming/build/llvm/actions.py
+++ b/programming/build/llvm/actions.py
@@ -9,60 +9,64 @@ from pisi.actionsapi import shelltools
from pisi.actionsapi import get
from pisi.actionsapi import cmaketools
+projects = "clang;polly;compiler-rt;mlir" if get.buildTYPE() == "emul32" else "clang;clang-tools-extra;lld;lldb;polly;compiler-rt;mlir"
libdir = "/usr/lib32/llvm" if get.buildTYPE() == "emul32" else "/usr/lib/llvm"
lib = "lib32" if get.buildTYPE() == "emul32" else "lib"
libsuffix = "32" if get.buildTYPE() == "emul32" else ""
-NoStrip = ["/usr/lib/clang/%s/lib/linux" % get.srcVERSION()]
+NoStrip = ["/usr/"]
+
+WorkDir = "llvm-project-%s/llvm" %get.srcVERSION()
def setup():
- #pisitools.ldflags.add("-fuse-ld=lld")
+ pisitools.ldflags.add("-fuse-ld=lld")
- if get.buildTYPE() != "emul32":
- if not shelltools.can_access_directory("tools/clang"):
- shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")
+ #if get.buildTYPE() != "emul32":
+ #if not shelltools.can_access_directory("tools/clang"):
+ #shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")
- shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/clang-tools-extra-*", "tools/clang/tools/extra")
+ #shelltools.system("tar xf ../clang-tools-extra-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/clang-tools-extra-*", "tools/clang/tools/extra")
- shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/lldb-*", "tools/lldb")
+ #shelltools.system("tar xf ../lldb-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/lldb-*", "tools/lldb")
- shelltools.system("tar xf ../lld-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/lld-*", "tools/lld")
+ #shelltools.system("tar xf ../lld-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/lld-*", "tools/lld")
- shelltools.system("tar xf ../polly-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/polly-*", "tools/polly")
+ #shelltools.system("tar xf ../polly-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/polly-*", "tools/polly")
- if not shelltools.can_access_directory("projects/compiler-rt"):
- shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
- shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")
+ #if not shelltools.can_access_directory("projects/compiler-rt"):
+ #shelltools.system("tar xf ../compiler-rt-%s.src.tar.xz -C projects" % get.srcVERSION())
+ #shelltools.move("projects/compiler-rt-%s.src" % get.srcVERSION(), "projects/compiler-rt")
- #clang patch
- #shelltools.cd("tools")
- #shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
- #shelltools.cd("..")
+ ##clang patch
+ ##shelltools.cd("tools")
+ ##shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
+ ##shelltools.cd("..")
+ ##shelltools.export("CC", "clang")
+ ##shelltools.export("CXX", "clang++")
#shelltools.export("CC", "clang")
#shelltools.export("CXX", "clang++")
- shelltools.export("CC", "gcc")
- shelltools.export("CXX", "g++")
- else:
- shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
- shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")
+ #else:
+ #shelltools.system("tar xf ../clang-%s.src.tar.xz -C tools" % get.srcVERSION())
+ #shelltools.move("tools/clang-%s.src" % get.srcVERSION(), "tools/clang")
if get.buildTYPE() == "emul32":
- #shelltools.export("CC", "clang -m32")
- #shelltools.export("CXX", "clang++ -m32")
- shelltools.export("CC", "gcc -m32")
- shelltools.export("CXX", "g++ -m32")
+ shelltools.export("CC", "clang -m32")
+ shelltools.export("CXX", "clang++ -m32")
shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
#clang patch
#shelltools.cd("tools")
#shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
#shelltools.cd("..")
+ else:
+ shelltools.export("CC", "clang")
+ shelltools.export("CXX", "clang++")
shelltools.makedirs("build")
@@ -70,47 +74,49 @@ def setup():
if get.buildTYPE() != "emul32":
options = "-DCMAKE_C_FLAGS:STRING=-m64 \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_CXX_FLAGS:STRING=-m64 \
- -DLLVM_TARGET_ARCH:STRING=x86_64 \
- -DLLDB_ENABLE_LUA=OFF \
- -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_CXX_FLAGS:STRING=-m64 \
+ -DLLVM_TARGET_ARCH:STRING=x86_64 \
+ -DLLDB_ENABLE_LUA=OFF \
+ -DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
if get.buildTYPE() == "emul32":
options = " -DCMAKE_C_FLAGS:STRING=-m32 \
- -DCMAKE_INSTALL_PREFIX=/emul32 \
- -DLLVM_TARGET_ARCH:STRING=i686 \
- -DLLVM_LIBDIR_SUFFIX=32 \
- -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
- -DCMAKE_CXX_FLAGS:STRING=-m32"
+ -DCMAKE_INSTALL_PREFIX=/emul32 \
+ -DLLVM_TARGET_ARCH:STRING=i686 \
+ -DLLVM_LIBDIR_SUFFIX=32 \
+ -DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
+ -DCMAKE_CXX_FLAGS:STRING=-m32"
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
- %s \
- -DLLVM_ENABLE_FFI=ON \
- -DLLVM_BUILD_DOCS=OFF \
- -DLLVM_ENABLE_RTTI=ON \
- -DLLVM_ENABLE_EH=ON \
- -DLLVM_BUILD_LLVM_DYLIB=ON \
- -DLLVM_LINK_LLVM_DYLIB=ON \
- -DLLVM_INCLUDEDIR=/usr/include \
- -DLLVM_ENABLE_ASSERTIONS=OFF \
- -DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
- -DCOMPILER_RT_USE_LIBCXX=OFF \
- -DLIBOMP_USE_HIER_SCHED=ON" % (options), sourceDir=".." )
+ -G 'Ninja' \
+ %s \
+ -DLLVM_ENABLE_PROJECTS='%s' \
+ -DLLVM_ENABLE_FFI=ON \
+ -DLLVM_BUILD_DOCS=OFF \
+ -DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_ENABLE_EH=ON \
+ -DBUILD_SHARED_LIBS=ON \
+ -DLLVM_INCLUDEDIR=/usr/include \
+ -DLLVM_ENABLE_ASSERTIONS=OFF \
+ -DFFI_INCLUDE_DIR=/usr/include \
+ -DCOMPILER_RT_USE_LIBCXX=OFF \
+ -DCLANG_DEFAULT_RTLIB=compiler-rt \
+ .. " % (options, projects), sourceDir=".." )
def build():
shelltools.makedirs("build")
shelltools.cd("build")
- cmaketools.make()
+ shelltools.system("ninja")
def install():
shelltools.makedirs("build")
shelltools.cd("build")
- cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
+ shelltools.system("DESTDIR=%s ninja install" % get.installDIR())
if get.buildTYPE() == "emul32":
@@ -118,8 +124,8 @@ def install():
pisitools.insinto("/usr/include/llvm/Config/","%s/emul32/include/llvm/Config/llvm-config.h" % get.installDIR(),"llvm-config-32.h")
pisitools.insinto("/usr/bin/","%s/emul32/bin/llvm-config" % get.installDIR(),"llvm-config-32")
pisitools.removeDir("/emul32")
- pisitools.remove("/usr/lib/python2.7/site-packages/six.py")
+ #pisitools.remove("/usr/lib/python2.7/site-packages/six.py")
shelltools.cd ("..")
-
- pisitools.dodoc("CREDITS.TXT", "LICENSE.TXT", "README.txt")
+
+ pisitools.dodoc("LICENSE.TXT", "README.txt")
diff --git a/programming/build/llvm/pspec.xml b/programming/build/llvm/pspec.xml
index 0c1bef0247..ecf0198a93 100755
--- a/programming/build/llvm/pspec.xml
+++ b/programming/build/llvm/pspec.xml
@@ -11,13 +11,7 @@
NCSA
The Low Level Virtual Machine
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Despite its name, LLVM has little to do with traditional virtual machines, though it does provide helpful libraries that can be used to build them.
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-tools-extra-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/lldb-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/lld-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/polly-10.0.1.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/compiler-rt-10.0.1.src.tar.xz
+ https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-project-11.0.0.tar.xz
zlib-devel
libxml2-devel
@@ -32,8 +26,9 @@
binutils
gcc
-
-
+ llvm-clang
+ lld
+ ninja
enable-SSP-and-PIE-by-default.patch
@@ -56,6 +51,7 @@
/usr/bin
/usr/bin/llvm-config
/usr/include/llvm*
+ /usr/include/mlir*
/usr/include/polly*
/usr/lib/llvm
/usr/lib
@@ -84,10 +80,12 @@
/usr/lib/libLLVM*.so
- /usr/lib/libLLVM*.so.10
+ /usr/lib/libLLVM*.so.11
/usr/lib/LLVMgold.*
/usr/lib/libLTO.*
/usr/lib/libPolly*.so
+ /usr/lib/libMLIR*
+ /usr/lib/libmlir*
/usr/lib/bfd-plugins/LLVMgold.so
/usr/share/licenses/llvm-libs/LICENSE
@@ -194,14 +192,14 @@
/usr/libexec/c++-*
-
+
compiler-rt
Various runtime libraries used by Clang
- /usr/lib/clang/10.0.1/lib/linux/*.so
+ /usr/lib/clang/11.0.0/lib/linux/*.so
@@ -239,6 +237,7 @@
/usr/include/clang
/usr/include/clang-c
+ /usr/include/clang-tidy
@@ -279,6 +278,13 @@
+
+ 2020-11-12
+ 11.0.0
+ Version bump.
+ İdris Kalp
+ idriskalp@gmail.com
+
2020-09-23
10.0.1