You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two setups are possible to build: in-tree and out-of-tree. The in-tree setup is the most straightforward, as it will build LLVM dependencies as well.
99
99
100
-
##### ...with LLVM "in-tree" using...
100
+
##### ...with LLVM "in-tree"
101
101
102
-
The following commands generate configuration files to build the project *in-tree*, that is, using llvm/llvm-project as the main build. This will build LLVM as well as torch-mlir and its subprojects.
103
-
104
-
###### ...Base + Optimization Options
105
-
106
-
If you do anticipate needing to frequently rebuild LLVM "in-tree", run:
107
-
108
-
```shell
109
-
cmake -GNinja -Bbuild \
110
-
`# Enables "--debug" and "--debug-only" flags for the "torch-mlir-opt" tool` \
`# use LLD to link in seconds, rather than minutes` \
126
-
-DCMAKE_LINKER_TYPE=lld
127
-
```
128
-
129
-
- This requires [the enablement mentioned earlier](#optional-enable-quicker-builds).
130
-
- If you encounter issues when you run this, try the [simplified build command](#base-options) instead.
131
-
132
-
###### ...Base Options
133
-
134
-
If you don't anticipate needing to frequently rebuild LLVM "in-tree", run:
102
+
The following command generates configuration files to build the project *in-tree*, that is, using llvm/llvm-project as the main build. This will build LLVM as well as torch-mlir and its subprojects.
135
103
136
104
```shell
137
105
cmake -GNinja -Bbuild \
@@ -167,12 +135,30 @@ cmake -GNinja -Bbuild \
167
135
.
168
136
```
169
137
170
-
- The same QoL CMake flags can be used to enable clang, ccache, and lld.
171
138
- Be sure to have built LLVM with `-DLLVM_ENABLE_PROJECTS=mlir`.
172
139
- Be aware that the installed version of LLVM needs in general to match the committed version in `externals/llvm-project`. Using a different version may or may not work.
0 commit comments