mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-13 10:42:05 +00:00
282358fac9
[mlir rebase] Add MLIR config and react to MLIR name changes Similar to flang-compiler/f18#1085. Now use the MLIR package to set up paths for include files and libraries. Three MLIR names changed: * VectorOpsDialect to VectorDialect * AffineOpsDialect to AffineDialect * createVectorizePass to createSuperVectorizePass Update README.md to explain how to link with MLIR. Update the example gcc to version 8.3. Update drone.io config to define -DMLIR_DIR Co-authored-by: Jean Perier <jperier@nvidia.com> Original-commit: flang-compiler/f18@116f64315f Reviewed-on: https://github.com/flang-compiler/f18/pull/1090
61 lines
2.9 KiB
Plaintext
61 lines
2.9 KiB
Plaintext
def clang(arch):
|
|
return {
|
|
"kind": "pipeline",
|
|
"name": "%s-clang" % arch,
|
|
"steps": [
|
|
{
|
|
"name": "test",
|
|
"image": "ubuntu",
|
|
"commands": [
|
|
"apt-get update && apt-get install -y clang-8 cmake ninja-build lld-8 llvm-8-dev libc++-8-dev libc++abi-8-dev libz-dev git",
|
|
"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
|
|
"mkdir llvm-project/build && cd llvm-project/build",
|
|
'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
|
|
"ninja install",
|
|
"cd ../..",
|
|
"mkdir build && cd build",
|
|
'env CC=clang-8 CXX=clang++-8 CXXFLAGS="-UNDEBUG -stdlib=libc++" LDFLAGS="-fuse-ld=lld" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
|
|
"ninja -j8",
|
|
"ctest --output-on-failure -j24",
|
|
"ninja check-all",
|
|
],
|
|
},
|
|
],
|
|
|
|
}
|
|
|
|
def gcc(arch):
|
|
return {
|
|
"kind": "pipeline",
|
|
"name": "%s-gcc" % arch,
|
|
"steps": [
|
|
{
|
|
"name": "test",
|
|
"image": "gcc",
|
|
"commands": [
|
|
"apt-get update && apt-get install -y cmake ninja-build llvm-dev libz-dev git",
|
|
"git clone --depth=1 -b f18 https://github.com/flang-compiler/f18-llvm-project.git llvm-project",
|
|
"mkdir llvm-project/build && cd llvm-project/build",
|
|
'env CC=gcc CXX=g++ LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../install -DLLVM_TARGETS_TO_BUILD=host -DLLVM_INSTALL_UTILS=On -DLLVM_ENABLE_PROJECTS="mlir" ../llvm',
|
|
"ninja install",
|
|
"cd ../..",
|
|
"mkdir build && cd build",
|
|
'env CC=gcc CXX=g++ CXXFLAGS="-UNDEBUG" LDFLAGS="-fuse-ld=gold" cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. -DLLVM_DIR=/drone/src/llvm-project/install/lib/cmake/llvm -DMLIR_DIR=/drone/src/llvm-project/install/lib/cmake/mlir -DLLVM_EXTERNAL_LIT=/drone/src/llvm-project/build/bin/llvm-lit',
|
|
"ninja -j8",
|
|
"ctest --output-on-failure -j24",
|
|
"ninja check-all",
|
|
],
|
|
},
|
|
],
|
|
|
|
}
|
|
|
|
def main(ctx):
|
|
return [
|
|
clang("amd64"),
|
|
clang("arm64"),
|
|
gcc("amd64"),
|
|
gcc("arm64"),
|
|
]
|
|
|