Commit e2455bf
authored
[BOLT][DWARF] Get DWO file via relative path if the CompilationDir does not exist (#154515)
In distributed builds, the DWARF CompilationDir is often invalid,
causing BOLT to fail when locating DWO files. If the default path does
not exist, it seems better to consider the DWOName as a relative path in
this case.
The implementation of this patch will try to search for the DWO file in
the following order:
1. CompDirOverride + DWOName (if CompDirOverride specified)
2. CompilationDir + DWOName (if CompilationDir exists)
3. **Current directory + DWOName (relative path as a fallback)**
This patch also fixes a crash that occurs when DWOName is an absolute path and a DWP file is provided.1 parent d271ace commit e2455bf
File tree
3 files changed
+39
-8
lines changed- bolt
- lib
- Core
- Rewrite
- test
3 files changed
+39
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
1632 | 1633 | | |
1633 | 1634 | | |
1634 | 1635 | | |
1635 | | - | |
| 1636 | + | |
| 1637 | + | |
1636 | 1638 | | |
1637 | | - | |
1638 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1639 | 1647 | | |
| 1648 | + | |
| 1649 | + | |
1640 | 1650 | | |
1641 | 1651 | | |
1642 | 1652 | | |
1643 | 1653 | | |
1644 | 1654 | | |
1645 | 1655 | | |
1646 | 1656 | | |
1647 | | - | |
| 1657 | + | |
| 1658 | + | |
1648 | 1659 | | |
1649 | 1660 | | |
1650 | 1661 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1846 | 1846 | | |
1847 | 1847 | | |
1848 | 1848 | | |
| 1849 | + | |
1849 | 1850 | | |
1850 | 1851 | | |
1851 | 1852 | | |
1852 | 1853 | | |
1853 | 1854 | | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1858 | 1859 | | |
1859 | 1860 | | |
1860 | 1861 | | |
| |||
| 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 | + | |
0 commit comments