-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] move build instructions to docs
- Loading branch information
Showing
2 changed files
with
57 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,11 @@ | ||
> "There is one who could unite them, one who could reclaim the throne of Gondor." (Gandalf) | ||
|
||
<img src="https://github.com/Lancern/mlir-gccjit/raw/main/logo.png" width="232px" height="273px" align="right" /> | ||
|
||
|
||
|
||
# mlir-gccjit | ||
|
||
MLIR dialect for [`libgccjit`](https://gcc.gnu.org/onlinedocs/jit/). | ||
|
||
## Prerequisites | ||
|
||
In general you need the following tools and libraries to build `mlir-gccjit`: | ||
|
||
- A working C++ compiler toolchain that supports C++17 standard. | ||
- [CMake] with minimum version 3.22. | ||
- [Ninja] build system (recommended but not mandatory). | ||
- [LLVM] libraries and development files. For now we have only tested LLVM-18. | ||
- [MLIR] libraries and development files. For now we have only tested MLIR-18. | ||
- [libgccjit] libraries and development files. For now we have only tested | ||
libgccjit-14. | ||
|
||
[CMake]: https://cmake.org/ | ||
[Ninja]: https://ninja-build.org/ | ||
[LLVM]: https://llvm.org/ | ||
[MLIR]: https://mlir.llvm.org/ | ||
[libgccjit]: https://gcc.gnu.org/onlinedocs/jit/ | ||
|
||
For Ubuntu 24.04 (noble) users: | ||
|
||
```bash | ||
apt-get install build-essential cmake ninja-build llvm-18-dev llvm-18-tools libmlir-18-dev libgccjit-14-dev mlir-18-tools | ||
``` | ||
|
||
Additionally, you need the [`lit` tool] to run tests. You can install the tool | ||
via `pip`: | ||
|
||
```bash | ||
pip install lit | ||
``` | ||
|
||
[`lit` tool]: https://llvm.org/docs/CommandGuide/lit.html | ||
|
||
## Build | ||
|
||
Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/Lancern/mlir-gccjit.git | ||
cd mlir-gccjit | ||
``` | ||
|
||
Create a build directory: | ||
|
||
```bash | ||
mkdir build | ||
cd build | ||
``` | ||
|
||
Build with CMake: | ||
|
||
```bash | ||
cmake -G Ninja .. | ||
cmake --build . | ||
``` | ||
|
||
## License | ||
|
||
Please refer to [COPYING](COPYING) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Build From Source | ||
|
||
## Prerequisites | ||
|
||
In general you need the following tools and libraries to build `mlir-gccjit`: | ||
|
||
- A working C++ compiler toolchain that supports C++17 standard. | ||
- [CMake] with minimum version 3.22. | ||
- [Ninja] build system (recommended but not mandatory). | ||
- [LLVM] libraries and development files. For now we have only tested LLVM-18. | ||
- [MLIR] libraries and development files. For now we have only tested MLIR-18. | ||
- [libgccjit] libraries and development files. For now we have only tested | ||
libgccjit-14. | ||
|
||
[CMake]: https://cmake.org/ | ||
[Ninja]: https://ninja-build.org/ | ||
[LLVM]: https://llvm.org/ | ||
[MLIR]: https://mlir.llvm.org/ | ||
[libgccjit]: https://gcc.gnu.org/onlinedocs/jit/ | ||
|
||
For Ubuntu 24.04 (noble) users: | ||
|
||
```bash | ||
apt-get install build-essential cmake ninja-build llvm-18-dev llvm-18-tools libmlir-18-dev libgccjit-14-dev mlir-18-tools | ||
``` | ||
|
||
Additionally, you need the [`lit` tool] to run tests. You can install the tool | ||
via `pip`: | ||
|
||
```bash | ||
pip install lit | ||
``` | ||
|
||
[`lit` tool]: https://llvm.org/docs/CommandGuide/lit.html | ||
|
||
## Build | ||
|
||
Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/Lancern/mlir-gccjit.git | ||
cd mlir-gccjit | ||
``` | ||
|
||
Create a build directory: | ||
|
||
```bash | ||
mkdir build | ||
cd build | ||
``` | ||
|
||
Build with CMake: | ||
|
||
```bash | ||
cmake -G Ninja .. | ||
cmake --build . | ||
``` |