Commit 6766070
committed
Allow downloading LLVM on Windows
- Don't ignore packaging `llvm/lib/` for `rust-dev` when LLVM is linked
statically
- Add `link-type.txt` so bootstrap knows whether llvm was linked
statically or dynamically
- Don't assume CI LLVM is linked dynamically in `bootstrap::config`
- Fall back to dynamic linking if `link-type.txt` doesn't exist
- Fix existing bug that split the output of `llvm-config` on lines, not spaces
- Enable building LLVM tests
This works around the following llvm bug:
```
llvm-config: error: component libraries and shared library
llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest.a
llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libgtest_main.a
llvm-config: error: missing: /home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/lib/libLLVMTestingSupport.a
thread 'main' panicked at 'command did not execute successfully: "/home/joshua/rustc2/build/x86_64-unknown-linux-gnu/llvm/build/bin/llvm-config" "--libfiles"
```
I'm not sure why llvm-config thinks these are required, but to avoid
the error, this builds them anyway.
- Temporarily set windows as the try builder. This should be reverted
before merging.
- Bump version of `download-ci-llvm-stamp`
`src/llvm-project` hasn't changed, but the generated tarball has.
- Only special case MacOS when dynamic linking. Static linking works fine.
- Store `link-type.txt` to the top-level of the tarball
This allows writing the link type unconditionally. Previously, bootstrap
had to keep track of whether the file IO *would* succeed (it would fail
if `lib/` didn't exist), which was prone to bugs.
- Make `link-type.txt` required
Anyone downloading this from CI should be using a version of bootstrap
that matches the version of the uploaded artifacts. So a missing
link-type indicates a bug in x.py.1 parent e48eb37 commit 6766070
File tree
4 files changed
+35
-22
lines changed- src/bootstrap
4 files changed
+35
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
819 | | - | |
820 | | - | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
821 | 823 | | |
822 | 824 | | |
823 | 825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1800 | 1800 | | |
1801 | 1801 | | |
1802 | 1802 | | |
1803 | | - | |
1804 | | - | |
| 1803 | + | |
1805 | 1804 | | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
1810 | | - | |
1811 | | - | |
1812 | | - | |
1813 | | - | |
1814 | | - | |
1815 | 1805 | | |
| 1806 | + | |
| 1807 | + | |
1816 | 1808 | | |
1817 | 1809 | | |
1818 | 1810 | | |
| |||
1828 | 1820 | | |
1829 | 1821 | | |
1830 | 1822 | | |
1831 | | - | |
| 1823 | + | |
1832 | 1824 | | |
1833 | 1825 | | |
1834 | 1826 | | |
| |||
1837 | 1829 | | |
1838 | 1830 | | |
1839 | 1831 | | |
1840 | | - | |
| 1832 | + | |
1841 | 1833 | | |
1842 | 1834 | | |
1843 | 1835 | | |
1844 | 1836 | | |
1845 | 1837 | | |
| 1838 | + | |
1846 | 1839 | | |
1847 | | - | |
1848 | | - | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
1849 | 1845 | | |
1850 | 1846 | | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
1851 | 1850 | | |
1852 | 1851 | | |
1853 | 1852 | | |
1854 | 1853 | | |
1855 | 1854 | | |
1856 | 1855 | | |
1857 | | - | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
1858 | 1862 | | |
1859 | 1863 | | |
1860 | 1864 | | |
1861 | 1865 | | |
1862 | 1866 | | |
1863 | 1867 | | |
1864 | | - | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
1865 | 1874 | | |
1866 | 1875 | | |
1867 | 1876 | | |
| |||
1973 | 1982 | | |
1974 | 1983 | | |
1975 | 1984 | | |
1976 | | - | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
1977 | 1989 | | |
1978 | 1990 | | |
1979 | 1991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
0 commit comments