On Tue, 12 Jan 2021, Liu Hao wrote:

While we’re at it, how could we reflect the target CRT (MSVCRT, UCRT, or one
of the version-specific RTs)?


Ideally they should be denoted by distinct triplets. For example, on Linux 
`*-*-linux` and
`*-*-linux-gnu` are triplets for Glibc, while targets that use musl as the C 
library may expect
`*-*-linux-musl`.

I'm a little undecided about this. Because the ABI (e.g. calling conventions) is the same, but anything that touches CRT data structures or functions is of course different - so practically, anything that is statically linked together needs to be matching. Across dynamic link boundaries, one can mix and match, provided that one doesn't share CRT objects across the boundaries.

But then again, the CRT choice isn't the only thing that affects the "ABI". For C++ code, the choice of C++ standard library also plays a similar role. (My llvm-mingw toolchains use libc++ and libcxxabi, so any C++ code built with that probably is incompatible with code built against libstdc++.) So is it worth to start overloading the triple with all those details, like *-*-mingw32-ucrtlibcxx?

I'm not really suggesting such a triple, but just putting it up for discussion, as that's almost as much of an issue as the CRT.

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to