llvm reset
This commit is contained in:
Executable → Regular
+71
-44
@@ -9,90 +9,117 @@ from pisi.actionsapi import shelltools
|
|||||||
from pisi.actionsapi import get
|
from pisi.actionsapi import get
|
||||||
from pisi.actionsapi import cmaketools
|
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"
|
libdir = "/usr/lib32/llvm" if get.buildTYPE() == "emul32" else "/usr/lib/llvm"
|
||||||
lib = "lib32" if get.buildTYPE() == "emul32" else "lib"
|
lib = "lib32" if get.buildTYPE() == "emul32" else "lib"
|
||||||
libsuffix = "32" if get.buildTYPE() == "emul32" else ""
|
libsuffix = "32" if get.buildTYPE() == "emul32" else ""
|
||||||
|
|
||||||
NoStrip = ["/usr/lib/clang/%s/lib/linux" %get.srcVERSION()]
|
NoStrip = ["/usr/lib/clang/%s/lib/linux" % get.srcVERSION()]
|
||||||
|
|
||||||
WorkDir = "llvm-project-%s/llvm" %get.srcVERSION()
|
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
pisitools.ldflags.add("-fuse-ld=lld")
|
#pisitools.ldflags.add("-fuse-ld=lld")
|
||||||
pisitools.cflags.remove("-D_FORTIFY_SOURCE=2")
|
|
||||||
pisitools.cxxflags.remove("-D_FORTIFY_SOURCE=2")
|
|
||||||
|
|
||||||
|
|
||||||
|
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 ../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 ../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")
|
||||||
|
|
||||||
|
#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", "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")
|
||||||
|
|
||||||
if get.buildTYPE() == "emul32":
|
if get.buildTYPE() == "emul32":
|
||||||
shelltools.export("CC", "clang -m32")
|
#shelltools.export("CC", "clang -m32")
|
||||||
shelltools.export("CXX", "clang++ -m32")
|
#shelltools.export("CXX", "clang++ -m32")
|
||||||
|
shelltools.export("CC", "gcc -m32")
|
||||||
|
shelltools.export("CXX", "g++ -m32")
|
||||||
shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
|
shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
|
||||||
|
|
||||||
#clang patch
|
#clang patch
|
||||||
#shelltools.cd("tools")
|
#shelltools.cd("tools")
|
||||||
#shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
|
#shelltools.system("patch -p1 < enable-SSP-and-PIE-by-default.patch")
|
||||||
#shelltools.cd("..")
|
#shelltools.cd("..")
|
||||||
else:
|
|
||||||
shelltools.export("CC", "clang")
|
|
||||||
shelltools.export("CXX", "clang++")
|
|
||||||
|
|
||||||
shelltools.makedirs("build")
|
shelltools.makedirs("build")
|
||||||
|
|
||||||
shelltools.cd("build")
|
shelltools.cd("build")
|
||||||
|
|
||||||
if get.buildTYPE() != "emul32":
|
if get.buildTYPE() != "emul32":
|
||||||
pisitools.cflags.add("-m64")
|
options = "-DCMAKE_C_FLAGS:STRING=-m64 \
|
||||||
pisitools.cxxflags.add("-m64")
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
options = "-DLLVM_TARGET_ARCH:STRING=x86_64 \
|
-DCMAKE_CXX_FLAGS:STRING=-m64 \
|
||||||
-DLLDB_ENABLE_LUA=OFF \
|
-DLLVM_TARGET_ARCH:STRING=x86_64 \
|
||||||
-DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
|
-DLLDB_ENABLE_LUA=OFF \
|
||||||
|
-DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
|
||||||
|
|
||||||
|
|
||||||
if get.buildTYPE() == "emul32":
|
if get.buildTYPE() == "emul32":
|
||||||
pisitools.cflags.add("-m32")
|
options = " -DCMAKE_C_FLAGS:STRING=-m32 \
|
||||||
pisitools.cxxflags.add("-m32")
|
-DCMAKE_INSTALL_PREFIX=/emul32 \
|
||||||
options = " -DCMAKE_INSTALL_PREFIX=/emul32 \
|
-DLLVM_TARGET_ARCH:STRING=i686 \
|
||||||
-DLLVM_TARGET_ARCH:STRING=i686 \
|
-DLLVM_LIBDIR_SUFFIX=32 \
|
||||||
-DLLVM_LIBDIR_SUFFIX=32 \
|
-DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu' \
|
||||||
-DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu'"
|
-DCMAKE_CXX_FLAGS:STRING=-m32"
|
||||||
|
|
||||||
|
|
||||||
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
|
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
|
||||||
-G 'Unix Makefiles' \
|
%s \
|
||||||
%s \
|
-DLLVM_ENABLE_FFI=ON \
|
||||||
-DLLVM_ENABLE_PROJECTS='%s' \
|
-DLLVM_BUILD_DOCS=OFF \
|
||||||
-DLLVM_ENABLE_FFI=ON \
|
-DLLVM_ENABLE_RTTI=ON \
|
||||||
-DLLVM_BUILD_DOCS=OFF \
|
-DLLVM_ENABLE_EH=ON \
|
||||||
-DLLVM_ENABLE_RTTI=ON \
|
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
||||||
-DLLVM_ENABLE_EH=ON \
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||||
-DBUILD_SHARED_LIBS=ON \
|
-DLLVM_INCLUDEDIR=/usr/include \
|
||||||
-DLLVM_INCLUDEDIR=/usr/include \
|
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
-DFFI_INCLUDE_DIR=/usr/lib/libffi-3.2.1/include \
|
||||||
-DFFI_INCLUDE_DIR=/usr/include \
|
-DCOMPILER_RT_USE_LIBCXX=OFF \
|
||||||
-DCOMPILER_RT_USE_LIBCXX=OFF \
|
-DLIBOMP_USE_HIER_SCHED=ON" % (options), sourceDir=".." )
|
||||||
-DCLANG_DEFAULT_RTLIB=compiler-rt \
|
|
||||||
.. " % (options, projects), sourceDir=".." )
|
|
||||||
|
|
||||||
def build():
|
def build():
|
||||||
shelltools.makedirs("build")
|
shelltools.makedirs("build")
|
||||||
shelltools.cd("build")
|
shelltools.cd("build")
|
||||||
|
|
||||||
autotools.make()
|
cmaketools.make()
|
||||||
|
|
||||||
def install():
|
def install():
|
||||||
shelltools.makedirs("build")
|
shelltools.makedirs("build")
|
||||||
shelltools.cd("build")
|
shelltools.cd("build")
|
||||||
|
|
||||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||||
|
|
||||||
|
if get.buildTYPE() == "emul32":
|
||||||
|
|
||||||
if get.buildTYPE() == "emul32":
|
|
||||||
pisitools.domove("/emul32/lib32/", "/usr/")
|
pisitools.domove("/emul32/lib32/", "/usr/")
|
||||||
pisitools.insinto("/usr/include/llvm/Config/","%s/emul32/include/llvm/Config/llvm-config.h" % get.installDIR(),"llvm-config-32.h")
|
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.insinto("/usr/bin/","%s/emul32/bin/llvm-config" % get.installDIR(),"llvm-config-32")
|
||||||
pisitools.removeDir("/emul32")
|
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 ("..")
|
shelltools.cd ("..")
|
||||||
|
|
||||||
pisitools.dodoc("LICENSE.TXT", "README.txt")
|
pisitools.dodoc("CREDITS.TXT", "LICENSE.TXT", "README.txt")
|
||||||
|
|||||||
Executable → Regular
+16
-21
@@ -11,7 +11,13 @@
|
|||||||
<License>NCSA</License>
|
<License>NCSA</License>
|
||||||
<Summary>The Low Level Virtual Machine</Summary>
|
<Summary>The Low Level Virtual Machine</Summary>
|
||||||
<Description>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.</Description>
|
<Description>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.</Description>
|
||||||
<Archive sha1sum="3c88390b19ac6779c8d9c89256892d690903412b" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-project-11.0.0.tar.xz</Archive>
|
<Archive sha1sum="25d07260f3b7bf4f647e115c4a663fdeda130fbd" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="0e61e92b22a620fe7f833fa8b2a56f2db96f7335" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="26c996da082677aca1016bcf2141dbff01dc7300" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang-tools-extra-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="90b946ff7b850bcded598509a10d0795e7da3f63" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/lldb-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="8581337dba00041c2633f61bfb5be778df83cff7" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/lld-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="fd1ece6c77d420f52d0502bc2b34075c353eed21" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/polly-10.0.1.src.tar.xz</Archive>
|
||||||
|
<Archive sha1sum="ee6077b4728b3c750e476938cead11cea45b49ff" type="binary">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/compiler-rt-10.0.1.src.tar.xz</Archive>
|
||||||
<BuildDependencies>
|
<BuildDependencies>
|
||||||
<Dependency>zlib-devel</Dependency>
|
<Dependency>zlib-devel</Dependency>
|
||||||
<Dependency>libxml2-devel</Dependency>
|
<Dependency>libxml2-devel</Dependency>
|
||||||
@@ -20,14 +26,14 @@
|
|||||||
<Dependency>libffi-devel</Dependency>
|
<Dependency>libffi-devel</Dependency>
|
||||||
<Dependency>groff</Dependency>
|
<Dependency>groff</Dependency>
|
||||||
<Dependency>swig</Dependency>
|
<Dependency>swig</Dependency>
|
||||||
|
<Dependency>python-devel</Dependency>
|
||||||
<Dependency>libedit-devel</Dependency>
|
<Dependency>libedit-devel</Dependency>
|
||||||
<Dependency versionFrom="3.18.3">cmake</Dependency>
|
<Dependency>cmake</Dependency>
|
||||||
<Dependency versionFrom="3.8.6">python3-devel</Dependency>
|
|
||||||
<!-- Use new plugin-api.h header file from binutils to enable LLVM gold plugin -->
|
<!-- Use new plugin-api.h header file from binutils to enable LLVM gold plugin -->
|
||||||
<Dependency>binutils</Dependency>
|
<Dependency>binutils</Dependency>
|
||||||
<Dependency>gcc</Dependency>
|
<Dependency>gcc</Dependency>
|
||||||
<Dependency>llvm-clang</Dependency>
|
<!-- <Dependency>llvm-clang</Dependency> -->
|
||||||
<Dependency>lld</Dependency>
|
<!-- <Dependency>lld</Dependency> -->
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<AdditionalFiles>
|
<AdditionalFiles>
|
||||||
<AdditionalFile owner="root" permission="0644" target="tools/enable-SSP-and-PIE-by-default.patch">enable-SSP-and-PIE-by-default.patch</AdditionalFile>
|
<AdditionalFile owner="root" permission="0644" target="tools/enable-SSP-and-PIE-by-default.patch">enable-SSP-and-PIE-by-default.patch</AdditionalFile>
|
||||||
@@ -50,7 +56,6 @@
|
|||||||
<Path fileType="executable">/usr/bin</Path>
|
<Path fileType="executable">/usr/bin</Path>
|
||||||
<Path fileType="executable">/usr/bin/llvm-config</Path>
|
<Path fileType="executable">/usr/bin/llvm-config</Path>
|
||||||
<Path fileType="header">/usr/include/llvm*</Path>
|
<Path fileType="header">/usr/include/llvm*</Path>
|
||||||
<Path fileType="header">/usr/include/mlir*</Path>
|
|
||||||
<Path fileType="header">/usr/include/polly*</Path>
|
<Path fileType="header">/usr/include/polly*</Path>
|
||||||
<Path fileType="library">/usr/lib/llvm</Path>
|
<Path fileType="library">/usr/lib/llvm</Path>
|
||||||
<Path fileType="library">/usr/lib</Path>
|
<Path fileType="library">/usr/lib</Path>
|
||||||
@@ -79,12 +84,10 @@
|
|||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
<Files>
|
<Files>
|
||||||
<Path fileType="library">/usr/lib/libLLVM*.so</Path>
|
<Path fileType="library">/usr/lib/libLLVM*.so</Path>
|
||||||
<Path fileType="library">/usr/lib/libLLVM*.so.11</Path>
|
<Path fileType="library">/usr/lib/libLLVM*.so.10</Path>
|
||||||
<Path fileType="library">/usr/lib/LLVMgold.*</Path>
|
<Path fileType="library">/usr/lib/LLVMgold.*</Path>
|
||||||
<Path fileType="library">/usr/lib/libLTO.*</Path>
|
<Path fileType="library">/usr/lib/libLTO.*</Path>
|
||||||
<Path fileType="library">/usr/lib/libPolly*.so</Path>
|
<Path fileType="library">/usr/lib/libPolly*.so</Path>
|
||||||
<Path fileType="library">/usr/lib/libMLIR*</Path>
|
|
||||||
<Path fileType="library">/usr/lib/libmlir*</Path>
|
|
||||||
<Path fileType="library">/usr/lib/bfd-plugins/LLVMgold.so</Path>
|
<Path fileType="library">/usr/lib/bfd-plugins/LLVMgold.so</Path>
|
||||||
<Path fileType="data">/usr/share/licenses/llvm-libs/LICENSE</Path>
|
<Path fileType="data">/usr/share/licenses/llvm-libs/LICENSE</Path>
|
||||||
</Files>
|
</Files>
|
||||||
@@ -101,7 +104,7 @@
|
|||||||
<Dependency>libedit</Dependency>
|
<Dependency>libedit</Dependency>
|
||||||
<Dependency>libgcc</Dependency>
|
<Dependency>libgcc</Dependency>
|
||||||
<Dependency>ncurses</Dependency>
|
<Dependency>ncurses</Dependency>
|
||||||
<Dependency>python3</Dependency>
|
<Dependency>python</Dependency>
|
||||||
<Dependency>libxml2</Dependency>
|
<Dependency>libxml2</Dependency>
|
||||||
<Dependency>xz</Dependency>
|
<Dependency>xz</Dependency>
|
||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
@@ -140,7 +143,7 @@
|
|||||||
<Dependency>libedit</Dependency>
|
<Dependency>libedit</Dependency>
|
||||||
<Dependency>libgcc</Dependency>
|
<Dependency>libgcc</Dependency>
|
||||||
<Dependency>ncurses</Dependency>
|
<Dependency>ncurses</Dependency>
|
||||||
<Dependency>python3</Dependency>
|
<Dependency>python</Dependency>
|
||||||
<Dependency>libxml2</Dependency>
|
<Dependency>libxml2</Dependency>
|
||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
<Files>
|
<Files>
|
||||||
@@ -191,14 +194,14 @@
|
|||||||
<Path fileType="executable">/usr/libexec/c++-*</Path>
|
<Path fileType="executable">/usr/libexec/c++-*</Path>
|
||||||
</Files>
|
</Files>
|
||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<Package>
|
<Package>
|
||||||
<Name>compiler-rt</Name>
|
<Name>compiler-rt</Name>
|
||||||
<Summary>Various runtime libraries used by Clang</Summary>
|
<Summary>Various runtime libraries used by Clang</Summary>
|
||||||
<RuntimeDependencies>
|
<RuntimeDependencies>
|
||||||
</RuntimeDependencies>
|
</RuntimeDependencies>
|
||||||
<Files>
|
<Files>
|
||||||
<Path fileType="library">/usr/lib/clang/11.0.0/lib/linux/*.so</Path>
|
<Path fileType="library">/usr/lib/clang/10.0.1/lib/linux/*.so</Path>
|
||||||
</Files>
|
</Files>
|
||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
@@ -236,7 +239,6 @@
|
|||||||
<Files>
|
<Files>
|
||||||
<Path fileType="header">/usr/include/clang</Path>
|
<Path fileType="header">/usr/include/clang</Path>
|
||||||
<Path fileType="header">/usr/include/clang-c</Path>
|
<Path fileType="header">/usr/include/clang-c</Path>
|
||||||
<Path fileType="header">/usr/include/clang-tidy</Path>
|
|
||||||
</Files>
|
</Files>
|
||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
@@ -277,13 +279,6 @@
|
|||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<History>
|
<History>
|
||||||
<Update release="14">
|
|
||||||
<Date>2020-11-15</Date>
|
|
||||||
<Version>11.0.0</Version>
|
|
||||||
<Comment>Version bump.</Comment>
|
|
||||||
<Name>İdris Kalp</Name>
|
|
||||||
<Email>idriskalp@gmail.com</Email>
|
|
||||||
</Update>
|
|
||||||
<Update release="13">
|
<Update release="13">
|
||||||
<Date>2020-09-23</Date>
|
<Date>2020-09-23</Date>
|
||||||
<Version>10.0.1</Version>
|
<Version>10.0.1</Version>
|
||||||
|
|||||||
Reference in New Issue
Block a user