Skip to content

Commit 6b8c2da

Browse files
authored
Fix/doc (#302)
* fixing generation of doc rules * added/corrected doc gen instructions
1 parent fdd860f commit 6b8c2da

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ python scripts/build_imex.py \
2929

3030
To reuse a previously built LLVM, use the following steps:
3131

32+
Make sure your LLVM install is built from the git commit sha as stated in
33+
'build_tools/llvm_version.txt'.
34+
3235
```sh
3336
external_lit=`which lit`
3437
python scripts/build_imex.py \
@@ -38,14 +41,24 @@ python scripts/build_imex.py \
3841
```
3942

4043
#### Building Bare Metal With Existing LLVM/MLIR
44+
Make sure your LLVM install is built from the git commit sha as stated in
45+
'build_tools/llvm_version.txt'.
4146
```sh
4247
mkdir build
4348
cd build
44-
CC=gcc-9 CXX=g++-9 MLIR_DIR=$llvm-c38ef550de81631641cb1485e0641d1d2227dce4 cmake ..
49+
CC=gcc-9 CXX=g++-9 MLIR_DIR=<llvm-install-directory> cmake ..
4550
make -j 12
4651
```
4752

48-
#### Building code docu
53+
#### Building docs
54+
To build user documentation do
55+
```sh
56+
cd build
57+
cmake --build . --target mlir-doc
58+
```
59+
It will render docs to the 'doc' directory.
60+
61+
To build code documentation use '-DIMEX_INCLUDE_DOCS' when configuring with cmake and do
4962
```sh
5063
cd build
5164
cmake --build . --target doc_doxygen
@@ -104,8 +117,9 @@ To run the FileCheck based tests, follow the following steps:
104117

105118
```sh
106119
cd <to your IMEX build directory>
107-
cmake --build . --target check-imex-opt
120+
cmake --build . --target check-imex
108121
```
122+
Add '-v' to the above command-line to get verbose output.
109123

110124
## License
111125
This code is made available under the Apache License 2.0 with LLVM Exceptions.

scripts/add_conversion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{name}.cpp
5252
5353
ADDITIONAL_HEADER_DIRS
54-
${{MLIR_MAIN_INCLUDE_DIR}}/mlir/Conversion/{name}
54+
${{MLIR_MAIN_INCLUDE_DIR}}/imex/Conversion/{name}
5555
5656
DEPENDS
5757
IMEXConversionPassIncGen

scripts/add_dialect.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
# Default rules for IR tablegen and alike
5252
with open(jp(incroot, args.name, "IR", "CMakeLists.txt"), "w") as f:
5353
f.write(f"add_mlir_dialect({args.name}Ops {args.name.lower()})\n")
54-
f.write(
55-
f"add_mlir_doc({args.name}Dialect {args.name}Dialect {args.name}/"
56-
+ " -gen-dialect-doc)\n"
57-
)
5854
f.write(
5955
f"add_mlir_doc({args.name}Ops {args.name}Dialect Dialects/ "
6056
+ "-gen-dialect-doc)\n"

0 commit comments

Comments
 (0)