Commit afe070e
Get rid of Skyframe interaction while calculating
This is required to avoid [Skyframe restart](https://github.com/bazelbuild/bazel/blob/0dd106e83ccbc149e31ef9ffeab76ab5f1bffdc6/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchain.java#L109-L112) in `cc_toolchain` rule.
After some research as it appears the only reason a custom `SkyFunction` was introduced for `--fdo_optimize` flag is to calculate full path in case its value was specified as a relative path to the workspace directory(interaction in [FdoHelper](https://github.com/bazelbuild/bazel/blob/0dd106e83ccbc149e31ef9ffeab76ab5f1bffdc6/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoHelper.java#L84-L96) and full path [calculation](https://github.com/bazelbuild/bazel/blob/0dd106e83ccbc149e31ef9ffeab76ab5f1bffdc6/src/main/java/com/google/devtools/build/lib/rules/cpp/CcSkyframeFdoSupportFunction.java#L54)). This is a hard blocker for Starlarkification of cc_toolchain rule and also not ideal to have FDO specific `SkyFunction` baked into `Bazel`.
Therefore the decision to *not* support relative paths for `--fdo_optimize` flag can be justified. This is a breaking change however relative paths should be easy to replace with `labels` to [`fdo_profile`](https://bazel.build/reference/be/c-cpp#fdo_profile) targets or fully qualified paths.
PiperOrigin-RevId: 526912841
Change-Id: I392cb8dee5d18398d8db643d0899f554b3542d7a--fdo_optimize flag value.1 parent 60c9cf3 commit afe070e
File tree
11 files changed
+25
-215
lines changed- src
- main/java/com/google/devtools/build/lib
- bazel/rules
- rules/cpp
- test/java/com/google/devtools/build/lib
- analysis/util
- rules/cpp
11 files changed
+25
-215
lines changedLines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | | - | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | | - | |
35 | 30 | | |
36 | 31 | | |
37 | 32 | | |
| |||
556 | 551 | | |
557 | 552 | | |
558 | 553 | | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | 554 | | |
567 | 555 | | |
568 | 556 | | |
| |||
Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 0 additions & 107 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | 83 | | |
93 | 84 | | |
94 | 85 | | |
95 | | - | |
96 | | - | |
| 86 | + | |
97 | 87 | | |
98 | 88 | | |
99 | 89 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
149 | 147 | | |
150 | 148 | | |
151 | 149 | | |
152 | | - | |
153 | | - | |
154 | | - | |
| 150 | + | |
155 | 151 | | |
156 | 152 | | |
157 | 153 | | |
| |||
Lines changed: 1 addition & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
118 | | - | |
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
| |||
134 | 132 | | |
135 | 133 | | |
136 | 134 | | |
137 | | - | |
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
| |||
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
155 | | - | |
156 | 152 | | |
157 | 153 | | |
158 | 154 | | |
| |||
173 | 169 | | |
174 | 170 | | |
175 | 171 | | |
176 | | - | |
177 | 172 | | |
178 | 173 | | |
179 | 174 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
0 commit comments