Commit b338a28
[LLD] [COFF] Restore the current dir as the first entry in the search path (#67857)
Before af744f0, the first entry
among the search paths was the empty string, indicating searching
in (or starting from) the current directory. After
af744f0, the toolchain/clang
specific lib directories were added at the head of the search path.
This would cause lookups of literal file names or relative paths
to match paths in the toolchain, if there are coincidental files
with similar names there, even if they would be find in the current
directory as well.
Change addClangLibSearchPaths to append to the list like all other
operations on searchPaths - but move the invocation of the
function to the right place in the sequence.
This fixes #67779.
(cherry picked from commit f906fd53b5ce12f07aec394ddf900c7f9f583405)1 parent 6a5be8e commit b338a28
2 files changed
+8
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | 648 | | |
653 | 649 | | |
654 | 650 | | |
655 | 651 | | |
656 | 652 | | |
657 | | - | |
658 | | - | |
659 | 653 | | |
660 | 654 | | |
661 | 655 | | |
662 | 656 | | |
663 | | - | |
664 | | - | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
665 | 661 | | |
666 | 662 | | |
667 | 663 | | |
| |||
1564 | 1560 | | |
1565 | 1561 | | |
1566 | 1562 | | |
| 1563 | + | |
| 1564 | + | |
1567 | 1565 | | |
1568 | 1566 | | |
1569 | 1567 | | |
1570 | 1568 | | |
1571 | 1569 | | |
1572 | | - | |
1573 | 1570 | | |
1574 | 1571 | | |
1575 | 1572 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments