Commit 46550dc
authored
Include transitive out_dirs in linking action (#3579)
If a build script compiles a file which is needed at linking time, and
adds a linker flag to add it to the search path, we need the out_dir to
be present in the link action in order for the search path flag to
actually take effect.
This was the original behaviour way back in
3a569b8 but got removed in
9426a38 which was intending to only
restrict where flags were propagated but also stopped propagating
out_dir files.
This is required because cargo uses the path to the out_dir as a
well-known-path that doesn't move between builds, so link flags from a
build script which get transitively propagated up to a link action
happen to point at the right location on disk. We need to propagate this
out_dir because the known location on disk is probably in a sandbox, so
we need to explicitly materialise the files into the sandbox.1 parent 41405f1 commit 46550dc
File tree
4 files changed
+56
-1
lines changed- rust/private
- test/unit
- transitive_link_search_paths
4 files changed
+56
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
| 1894 | + | |
1894 | 1895 | | |
1895 | 1896 | | |
1896 | 1897 | | |
| |||
1904 | 1905 | | |
1905 | 1906 | | |
1906 | 1907 | | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
1907 | 1914 | | |
1908 | 1915 | | |
1909 | 1916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
73 | 91 | | |
74 | 92 | | |
75 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 28 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| |||
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
49 | 70 | | |
50 | 71 | | |
51 | 72 | | |
52 | 73 | | |
53 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
54 | 80 | | |
55 | 81 | | |
56 | 82 | | |
| |||
63 | 89 | | |
64 | 90 | | |
65 | 91 | | |
| 92 | + | |
66 | 93 | | |
67 | 94 | | |
0 commit comments