Commit 9e0ddf7
committed
fix(build): the import-library and .def spellings follow the target ABI
Windows CI again, one layer further in:
lld-link: warning: ignoring unknown argument '--out-implib'
lld-link: error: could not open 'bin/mathkit-shared.lib': no such file
Clang targeting the MSVC ABI speaks the GNU DIALECT while driving lld-link, so a
dialect-keyed spelling handed the MSVC linker a MinGW flag. The `.def` had the
same problem from the other side: `/DEF:` was added only to the MSVC-dialect
rule, so a clang-driven MSVC-ABI link generated the file and never passed it.
Three flags in this PR made the identical mistake — `-fPIC`, the import library,
and `/DEF:` — and it is always the same one: asking which COMPILER when the
question is which TARGET. So the spelling leaves the dialect table entirely and
becomes `pe_link_flag`, which reads the target triple and wraps in `-Wl,` unless
the linker is invoked directly. The dialect table now says, where the entry used
to be, why it cannot answer this.
Verified in both directions locally: a MinGW target still gets
`-Wl,--out-implib,` and no def edge; ELF and Mach-O are untouched.1 parent 9bdb284 commit 9e0ddf7
2 files changed
Lines changed: 47 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
| |||
1058 | 1083 | | |
1059 | 1084 | | |
1060 | 1085 | | |
1061 | | - | |
| 1086 | + | |
1062 | 1087 | | |
1063 | 1088 | | |
1064 | 1089 | | |
| |||
1071 | 1096 | | |
1072 | 1097 | | |
1073 | 1098 | | |
1074 | | - | |
| 1099 | + | |
1075 | 1100 | | |
1076 | 1101 | | |
1077 | 1102 | | |
| |||
1853 | 1878 | | |
1854 | 1879 | | |
1855 | 1880 | | |
| 1881 | + | |
| 1882 | + | |
1856 | 1883 | | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | | - | |
1864 | | - | |
1865 | | - | |
1866 | | - | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1867 | 1895 | | |
1868 | | - | |
1869 | | - | |
1870 | 1896 | | |
1871 | 1897 | | |
1872 | 1898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
113 | 111 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| |||
219 | 218 | | |
220 | 219 | | |
221 | 220 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
| |||
258 | 253 | | |
259 | 254 | | |
260 | 255 | | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | 256 | | |
266 | 257 | | |
267 | 258 | | |
| |||
0 commit comments