Skip to content

Commit 2214344

Browse files
committed
Move dml_compile_commands explanation to README
1 parent d64cf0a commit 2214344

File tree

2 files changed

+23
-21
lines changed

2 files changed

+23
-21
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -203,24 +203,4 @@ particular order:
203203
- The folder of B
204204
- The root folder of the workspace
205205
- All other workspace roots
206-
- Every include path specified by the [DML Compile commands](#dml-compile-commands) under the related module
207-
208-
#### <a id="dml-compile-commands"></a> DML Compile Commands
209-
The DML compile commands file is used by the DLS in order to obtain per-module
210-
information used to resolve imports and specify options for specific devices.
211-
212-
Commonly this will be auto-generated by the CMake indexing in your Simics
213-
project, but it is possible to construct such a file by hand if absolutely
214-
neccessary. It is a json file with the following format:
215-
```
216-
{
217-
<full path to device file>: {
218-
"includes": [<include folders as full paths>],
219-
"dmlc_flags: [<flags passed to dmlc invocation>]
220-
},
221-
... <more device paths>
222-
}
223-
```
224-
225-
This will add the include folders specified when analysing files included,
226-
directly or indirectly, from the specified device file.
206+
- Every include path specified by the [DML Compile commands](README.md#dml-compile-commands) under the related module

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,25 @@ is not yet publicly available.
3232

3333
See [clients.md](clients.md) for information about how to implement
3434
your own language client compatible with the DML language server.
35+
36+
## <a id="dml-compile-commands"></a> DML Compile Commands
37+
The DML compile commands file is used by the language server in order to obtain
38+
per-module information used to resolve imports and obtain relevant command-line
39+
DMLC flags for specific devices.
40+
41+
Commonly this will be auto-generated by the CMake indexing in your Simics
42+
project (you may need to specify the environment variable "CMAKE_EXPORT_COMPILE_COMMANDS=1"
43+
before invoking cmake), but it is possible to construct such a file by hand if absolutely
44+
neccessary. It is a json file with the following format:
45+
```
46+
{
47+
<full path to device file>: {
48+
"includes": [<include folders as full paths>],
49+
"dmlc_flags: [<flags passed to dmlc invocation>]
50+
},
51+
... <more device paths>
52+
}
53+
```
54+
55+
This will add the include folders specified when analysing files included,
56+
directly or indirectly, from the specified device file.

0 commit comments

Comments
 (0)