Commit 0f59341
authored
Use toolchain for tree artifact rpath rewriting (#53580)
### What does this PR do?
Adds a TreeArtifact/directory tool to the `rpath_rewriter` toolchains and applies it to replace explicit os-based switching.
### Motivation
Continuation of #53450 work to leverage toolchains for adapting rpath rewriting to each platform.
### Describe how you validated your changes
Green CI, including passing health check and no visible package changes.
### Additional Notes
This drops the `otool` toolchain entirely, as these changes have moved the `otool` portion of the rewriting to simply calling the tool from the full path where the tool is meant to exist on macos systems. If we ever want to bring it back it should probably be included with the macos rewriting tool and not be made into a separate toolchain.
This change also made the remapping semantics of `dd_cc_packaged` consistent for files and for directories, simplifying the logic of the implementation and also making it easier to understand at the call site – this explains the changes to openssl and cpython BUILD files.
Co-authored-by: alex.lopez <alex.lopez@datadoghq.com>1 parent 94988ca commit 0f59341
22 files changed
Lines changed: 266 additions & 407 deletions
File tree
- bazel
- rules
- dd_packaging
- rewrite_rpath
- tests
- toolchains
- otool
- rpath_rewriter
- deps
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | 162 | | |
172 | 163 | | |
173 | 164 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 10 | + | |
14 | 11 | | |
15 | 12 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
22 | 16 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 17 | + | |
| 18 | + | |
37 | 19 | | |
38 | 20 | | |
39 | 21 | | |
| |||
51 | 33 | | |
52 | 34 | | |
53 | 35 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 36 | | |
72 | 37 | | |
73 | 38 | | |
74 | 39 | | |
75 | | - | |
76 | | - | |
77 | 40 | | |
78 | 41 | | |
79 | 42 | | |
| |||
175 | 138 | | |
176 | 139 | | |
177 | 140 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
182 | 144 | | |
183 | 145 | | |
184 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
63 | 82 | | |
64 | 83 | | |
65 | 84 | | |
| |||
434 | 453 | | |
435 | 454 | | |
436 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
437 | 492 | | |
438 | 493 | | |
439 | 494 | | |
| |||
449 | 504 | | |
450 | 505 | | |
451 | 506 | | |
| 507 | + | |
452 | 508 | | |
453 | 509 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 7 | + | |
| 8 | + | |
35 | 9 | | |
36 | | - | |
37 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
38 | 14 | | |
39 | 15 | | |
40 | 16 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 17 | + | |
67 | 18 | | |
68 | 19 | | |
69 | 20 | | |
70 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
71 | 24 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 25 | + | |
77 | 26 | | |
78 | 27 | | |
79 | 28 | | |
80 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
81 | 41 | | |
82 | | - | |
| 42 | + | |
83 | 43 | | |
84 | | - | |
| 44 | + | |
85 | 45 | | |
86 | 46 | | |
87 | 47 | | |
88 | 48 | | |
89 | | - | |
90 | | - | |
| 49 | + | |
| 50 | + | |
91 | 51 | | |
92 | 52 | | |
93 | 53 | | |
94 | 54 | | |
95 | 55 | | |
96 | 56 | | |
97 | 57 | | |
98 | | - | |
| 58 | + | |
99 | 59 | | |
100 | 60 | | |
101 | 61 | | |
| |||
117 | 77 | | |
118 | 78 | | |
119 | 79 | | |
120 | | - | |
| 80 | + | |
121 | 81 | | |
This file was deleted.
0 commit comments