Commit eafaff9
authored
Improve ergonomics of using TheRock as a development driver for sub-projects. (ROCm#1242)
The motivation of this change is to enable the following developer
productivity features:
* Development in a sub-project `build` directory should cause the
super-project to see the sub-project as out of date and take appropriate
action. This is done by injecting an ALL `therock-touch` target into
each sub-project so that `ninja` will invalidate the super-project
stage-install state, causing a re-install and rebuild of dependents.
* One stop commands to build and distribute in a sub-project without
switching back and forth. Users can now just run `ninja therock-dist` in
any sub-project to build and distribute their local changes (i.e. to
`build/dist/rocm`, etc).
* More coverage of `expunge` targets, making sure that project state can
be reset more completely.
Key changes:
* Removes some `therock-` prefixes from top level convenience targets.
* Defines `artifacts`, `archives`, `dist`, and `expunge` top level
convenience targets explicitly.
* Adds `expunge` steps to all phases of build, artifact assembly and
dist population.
* Removes the formal sub-project `+dist` phase, collapsing the creation
of the local `dist` directory into the `+stage` (install) step. This
separation was done early on when creating the dist/ tree was slow but
it doesn't pay for itself anymore and was becoming hard to distinguish
the different "dist" concepts in the project.
* Artifacts can be declared as belonging to different distributions
(default "rocm"), resulting in population of different trees in
`build/dist/{distribution}`. This was a TODO from the beginning.
* `{subproject}+dist` now is a convenience target that builds all
artifacts the project is a part of and populates the
`build/dist/{distname}` directory.
* Distributions (i.e. `build/dist/rocm`) are now populated incrementally
as artifact dependencies are met instead of as part of one top level
target which requires the whole project to be (re)built.
* New targets `therock-touch` and `therock-dist` are injected into every
sub-project, allowing development to be done completely in a sub-project
build directory while keeping super-project level artifacts and
distributions populated.
This should be NFC for all automation since the new barename targets
(dist, archives) are aliased to their originals. We could simplify this
in followups.1 parent 87ddf70 commit eafaff9
File tree
8 files changed
+194
-101
lines changed- build_tools
- tests
- cmake
- docs/development
8 files changed
+194
-101
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
447 | 448 | | |
448 | 449 | | |
449 | 450 | | |
450 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
274 | 275 | | |
275 | 276 | | |
276 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | 26 | | |
13 | 27 | | |
14 | | - | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| |||
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
26 | | - | |
27 | | - | |
| 40 | + | |
| 41 | + | |
28 | 42 | | |
29 | 43 | | |
30 | 44 | | |
| |||
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 54 | + | |
| 55 | + | |
43 | 56 | | |
44 | | - | |
45 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
46 | 72 | | |
47 | 73 | | |
48 | 74 | | |
| |||
57 | 83 | | |
58 | 84 | | |
59 | 85 | | |
60 | | - | |
| 86 | + | |
61 | 87 | | |
62 | 88 | | |
63 | 89 | | |
| 90 | + | |
64 | 91 | | |
65 | 92 | | |
66 | | - | |
| 93 | + | |
67 | 94 | | |
68 | 95 | | |
| 96 | + | |
69 | 97 | | |
70 | 98 | | |
71 | 99 | | |
72 | 100 | | |
73 | 101 | | |
74 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
75 | 110 | | |
76 | | - | |
77 | | - | |
78 | 111 | | |
79 | 112 | | |
80 | | - | |
| 113 | + | |
81 | 114 | | |
82 | 115 | | |
83 | 116 | | |
| |||
89 | 122 | | |
90 | 123 | | |
91 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
92 | 128 | | |
93 | | - | |
| 129 | + | |
94 | 130 | | |
| 131 | + | |
95 | 132 | | |
96 | 133 | | |
97 | 134 | | |
98 | 135 | | |
99 | 136 | | |
100 | 137 | | |
| 138 | + | |
101 | 139 | | |
102 | 140 | | |
103 | 141 | | |
| |||
117 | 155 | | |
118 | 156 | | |
119 | 157 | | |
120 | | - | |
121 | 158 | | |
122 | 159 | | |
123 | | - | |
124 | | - | |
125 | 160 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
142 | 164 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 165 | + | |
147 | 166 | | |
| 167 | + | |
148 | 168 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
153 | 190 | | |
154 | | - | |
155 | 191 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
0 commit comments