Compare commits

..

5 Commits

Author SHA1 Message Date
Thomas Hobson 2ae63a4d69
Merge pull request #354 from Niki4tap/master
Added a package to support LLVM IR
2021-10-07 02:49:26 +13:00
Niki4tap fbee9e6c22 pkg(llvm_ir-12.0.1): Add the package to readme and `ll` alias 2021-10-06 13:32:54 +00:00
Niki4tap 478ccefa58 pkg(llvm_ir-12.0.1): Fixed test.ll 2021-10-06 13:00:58 +00:00
Niki4tap 70cf0b1a90 Merged master branch 2021-10-06 12:57:16 +00:00
Niki4tap 82d6dfd3e9 pkg(llvm_ir-12.0.1): Added llvm_ir 12.0.1 2021-10-06 12:52:59 +00:00
7 changed files with 32 additions and 0 deletions

6
packages/llvm_ir/12.0.1/build.sh vendored Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz" -o llvm-ir.tar.xz
tar xf llvm-ir.tar.xz clang+llvm-12.0.1-x86_64-linux-gnu-ubuntu-/bin --strip-components=1
rm llvm-ir.tar.xz

4
packages/llvm_ir/12.0.1/compile vendored Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
llc "$@" -o binary.s
clang binary.s -o binary

2
packages/llvm_ir/12.0.1/environment vendored Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
export PATH=$PWD/bin:$PATH

5
packages/llvm_ir/12.0.1/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "llvm_ir",
"version": "12.0.1",
"aliases": ["llvm", "llvm-ir", "ll"]
}

4
packages/llvm_ir/12.0.1/run vendored Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
shift
binary "$@"

10
packages/llvm_ir/12.0.1/test.ll vendored Normal file
View File

@ -0,0 +1,10 @@
@.str = private unnamed_addr constant [2 x i8] c"OK"
declare i32 @puts(i8* nocapture) nounwind
define i32 @main() {
%cast210 = getelementptr [2 x i8],[2 x i8]* @.str, i64 0, i64 0
call i32 @puts(i8* %cast210)
ret i32 0
}

View File

@ -356,6 +356,7 @@ Content-Type: application/json
`julia`, `julia`,
`kotlin`, `kotlin`,
`lisp`, `lisp`,
`llvm_ir`,
`lolcode`, `lolcode`,
`lua`, `lua`,
`nasm`, `nasm`,