*: Switch to python
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
version = "20.1.0"
|
||||
revision = 1
|
||||
description = "LLVM compiler infrastructure with clang and lld"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
url = "https://llvm.org/"
|
||||
source = tarball(
|
||||
url=f"https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-project-{version}.src.tar.xz",
|
||||
sha256="4579051e3c255fb4bb795d54324f5a7f3ef79bd9181e44293d7ee9a7f62aad9a",
|
||||
)
|
||||
host_deps = ["binutils"]
|
||||
|
||||
|
||||
def configure(self):
|
||||
self.run(
|
||||
"cmake",
|
||||
"-S",
|
||||
self.source_dir / "llvm",
|
||||
"-B",
|
||||
self.build_dir,
|
||||
"-G",
|
||||
"Ninja",
|
||||
"-DCMAKE_BUILD_TYPE=Release",
|
||||
f"-DCMAKE_INSTALL_PREFIX={self.prefix}",
|
||||
"-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;lld",
|
||||
"-DLLVM_ENABLE_RUNTIMES=compiler-rt",
|
||||
"-DLLVM_TARGETS_TO_BUILD=X86;AArch64;RISCV",
|
||||
f"-DLLVM_DEFAULT_TARGET_TRIPLE={self.triple}",
|
||||
f"-DLLVM_HOST_TRIPLE={self.triple}",
|
||||
"-DLLVM_ENABLE_LIBXML2=OFF",
|
||||
"-DLLVM_ENABLE_LIBEDIT=OFF",
|
||||
"-DLLVM_ENABLE_TERMINFO=OFF",
|
||||
"-DLLVM_ENABLE_ASSERTIONS=OFF",
|
||||
"-DLLVM_ENABLE_PIC=ON",
|
||||
"-DLLVM_BUILD_LLVM_DYLIB=ON",
|
||||
"-DLLVM_LINK_LLVM_DYLIB=ON",
|
||||
"-DLLVM_INSTALL_UTILS=ON",
|
||||
"-DLLVM_INCLUDE_TESTS=OFF",
|
||||
"-DLLVM_INCLUDE_EXAMPLES=OFF",
|
||||
"-DLLVM_INCLUDE_BENCHMARKS=OFF",
|
||||
"-DCLANG_DEFAULT_LINKER=lld",
|
||||
"-DCLANG_DEFAULT_RTLIB=compiler-rt",
|
||||
"-DCLANG_DEFAULT_CXX_STDLIB=libstdc++",
|
||||
env={
|
||||
"CFLAGS": self.profile["host_cflags"],
|
||||
"CXXFLAGS": self.profile["host_cxxflags"],
|
||||
"LDFLAGS": self.profile["host_ldflags"],
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def build(self):
|
||||
self.run("cmake", "--build", self.build_dir, f"-j{self.jobs}")
|
||||
|
||||
|
||||
def install(self):
|
||||
self.run("cmake", "--install", self.build_dir, env={"DESTDIR": str(self.dest_dir)})
|
||||
Reference in New Issue
Block a user