Merge pull request #8998 from IdrisKalp/master

llvm 11.1.0
This commit is contained in:
Idris Kalp
2021-02-18 20:52:40 +03:00
committed by GitHub
2 changed files with 34 additions and 57 deletions
+18 -33
View File
@@ -16,52 +16,40 @@ libsuffix = "32" if get.buildTYPE() == "emul32" else " "
NoStrip = ["/usr/lib/clang/%s/lib/linux" % get.srcVERSION()]
#WorkDir = "llvm-project-%s" % get.srcVERSION()
WorkDir = "llvm-project-%s.src/llvm" % get.srcVERSION()
def setup():
shelltools.move("../llvm-project-%s/mlir" % get.srcVERSION(), "%s/mlir" % get.workDIR())
shelltools.move("../clang-%s.src" % get.srcVERSION(), "%s/clang" % get.workDIR())
#pisitools.ldflags.add("-fuse-ld=lld -rtlib=libgcc")
#pisitools.cflags.remove("-D_FORTIFY_SOURCE=2")
#pisitools.cxxflags.remove("-D_FORTIFY_SOURCE=2")
pisitools.ldflags.add("-fuse-ld=lld -rtlib=libgcc")
pisitools.cflags.remove("-D_FORTIFY_SOURCE=2")
pisitools.cxxflags.remove("-D_FORTIFY_SOURCE=2")
shelltools.export("CC", "clang")
shelltools.export("CXX", "clang++")
if get.buildTYPE() == "emul32":
shelltools.export("CC", "gcc -m32")
shelltools.export("CXX", "g++ -m32")
#if get.buildTYPE() == "emul32":
#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")
#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", "gcc")
shelltools.export("CXX", "g++")
#else:
#shelltools.export("CC", "gcc")
#shelltools.export("CXX", "g++")
#shelltools.export("CC", "clang")
#shelltools.export("CXX", "clang++")
shelltools.move("../compiler-rt-%s.src" % get.srcVERSION(), "%s/compiler-rt" % get.workDIR())
shelltools.move("../clang-tools-extra-%s.src" % get.srcVERSION(), "%s/clang-tools-extra" % get.workDIR())
shelltools.move("../lldb-%s.src" % get.srcVERSION(), "%s/lldb" % get.workDIR())
shelltools.move("../lld-%s.src" % get.srcVERSION(), "%s/lld" % get.workDIR())
shelltools.move("../polly-%s.src" % get.srcVERSION(), "%s/polly" % get.workDIR())
pisitools.dosed("../lld/test/ELF/shared.s", "lib64", "lib")
#polly patch
shelltools.cd("%s" % get.workDIR())
shelltools.system("patch -p1 < support-linking-ScopPassManager-against-LLVM-dylib.patch")
shelltools.cd("llvm-%s.src" % get.srcVERSION())
shelltools.makedirs("build")
shelltools.cd("build")
if get.buildTYPE() != "emul32":
pisitools.cflags.add("-m64")
pisitools.cxxflags.add("-m64")
pisitools.cxxflags.add("-m64 -Wno-c++11-narrowing")
options = "-DLLVM_TARGET_ARCH:STRING=x86_64 \
-DLLDB_ENABLE_LUA=OFF \
-DLLVM_DEFAULT_TARGET_TRIPLE=%s " % get.HOST()
@@ -69,7 +57,8 @@ def setup():
if get.buildTYPE() == "emul32":
pisitools.cflags.add("-m32")
pisitools.cxxflags.add("-m32")
pisitools.cxxflags.add("-m32 -Wno-c++11-narrowing")
shelltools.export("PKG_CONFIG_PATH","/usr/lib32/pkgconfig")
options = " -DCMAKE_INSTALL_PREFIX=/emul32 \
-DLLVM_TARGET_ARCH:STRING=i686 \
-DLLVM_DEFAULT_TARGET_TRIPLE='i686-pc-linux-gnu'"
@@ -84,14 +73,11 @@ def setup():
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_EH=ON \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DCLANG_LINK_CLANG_DYLIB=ON \
-DBUILD_SHARED_LIBS=ON \ \
-DLLDB_USE_SYSTEM_SIX=1 \
-DLLVM_INCLUDEDIR=/usr/include \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DFFI_INCLUDE_DIR=/usr/include \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DCOMPILER_RT_USE_LIBCXX=OFF" % (options, projects, libsuffix), sourceDir=".." )
def build():
@@ -110,7 +96,6 @@ def install():
pisitools.insinto("/usr/bin/","%s/emul32/bin/llvm-config" % get.installDIR(),"llvm-config-32")
pisitools.removeDir("/emul32")
#pisitools.remove("/usr/lib/python3.8/site-packages/six.py")
pisitools.dosym("/usr/lib/LLVMgold.so", "/usr/lib/bfd-plugins/LLVMgold.so")
shelltools.cd ("..")
+16 -24
View File
@@ -11,14 +11,7 @@
<License>NCSA</License>
<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>
<Archive sha1sum="5723ae20d1e6e9ccfda208cb9a8cf2f87c3a6107" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/llvm-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="02c87f5e07f2a1c1e2dbb8ce8328f0106d70b10d" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="b77dc0494894b997c8f4012debbf0bf469462386" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang-tools-extra-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="6bdb22e6b5e4700269f23452d66b0bddee93e008" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/lldb-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="60672d63fa16a0c3b6e267331fa605d76b79e87b" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/lld-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="455be0af2ffbc1db71e61c463398549ff553c198" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/polly-11.0.0.src.tar.xz</Archive>
<Archive sha1sum="be3e79fb93cd99135643a191f27c49449bf9c0ee" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/compiler-rt-11.0.0.src.tar.xz</Archive>
<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="713a5f9ce67713c2b955f9c016b4f96afa4162f1" type="tarxz">https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/llvm-project-11.1.0.src.tar.xz</Archive>
<BuildDependencies>
<Dependency>ninja</Dependency>
<Dependency>zlib-devel</Dependency>
@@ -34,16 +27,16 @@
<!-- Use new plugin-api.h header file from binutils to enable LLVM gold plugin -->
<Dependency>binutils</Dependency>
<Dependency>gcc</Dependency>
<!-- <Dependency>llvm-clang</Dependency> -->
<!-- <Dependency>lld</Dependency> -->
<Dependency>llvm-clang</Dependency>
<Dependency>lld</Dependency>
</BuildDependencies>
<AdditionalFiles>
<!--<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="../support-linking-ScopPassManager-against-LLVM-dylib.patch">support-linking-ScopPassManager-against-LLVM-dylib.patch</AdditionalFile>
</AdditionalFiles>
</AdditionalFiles>-->
<Patches>
<Patch>0001-SystemZ-Use-LA-instead-of-AGR-in-eliminateFrameIndex.patch</Patch>
<Patch>0001-backport-D88371-guard-find_library-tensorflow_c_api.patch</Patch>
<Patch>stack-clash-fixes.patch</Patch>
<Patch level="2">0001-SystemZ-Use-LA-instead-of-AGR-in-eliminateFrameIndex.patch</Patch>
<!-- <Patch level="2">0001-backport-D88371-guard-find_library-tensorflow_c_api.patch</Patch> -->
<!-- <Patch>stack-clash-fixes.patch</Patch> -->
</Patches>
</Source>
@@ -202,15 +195,7 @@
<Dependency>libgcc</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="executable">/usr/lib/clang/11.0.0/bin</Path>
<Path fileType="header">/usr/lib/clang/11.0.0/include/xray</Path>
<Path fileType="header">/usr/lib/clang/11.0.0/include/fuzzer</Path>
<Path fileType="header">/usr/lib/clang/11.0.0/include/sanitizer</Path>
<Path fileType="data">/usr/lib/clang/11.0.0/share</Path>
<Path fileType="library">/usr/lib/clang/11.0.0/lib/linux/*.a</Path>
<Path fileType="library">/usr/lib/clang/11.0.0/lib/linux/*.a.*</Path>
<Path fileType="library">/usr/lib/clang/11.0.0/lib/linux/*.o</Path>
<Path fileType="library">/usr/lib/clang/11.0.0/lib/linux/*.so</Path>
<Path fileType="library">/usr/lib/clang/11.1.0/lib/linux/*.so</Path>
</Files>
</Package>
@@ -323,6 +308,13 @@
</Package>
<History>
<Update release="15">
<Date>2021-02-17</Date>
<Version>11.1.0</Version>
<Comment>Version bump.</Comment>
<Name>İdris Kalp</Name>
<Email>idriskalp@gmail.com</Email>
</Update>
<Update release="14">
<Date>2020-11-12</Date>
<Version>11.0.0</Version>