[libcxx-dev] libcxx on MSVC6.0 runtime

Brendan Heinonen via libcxx-dev libcxx-dev at lists.llvm.org
Wed Mar 6 11:37:29 PST 2019


As you're probably aware, the runtime situation on Windows has been a real
mess prior to Universal CRT.  Many projects have dependency trees that
force them to stay on a particular MSVC version -- some projects are still
using MSVC 2010 and earlier!  Since Clang has quite expansive MSVC version
support, it seemed to only make sense to me that the included C++ standard
library would eventually have such support.

For our use case, we are writing system-level binaries and we don't really
have a choice in what runtime library we use or how we link -- we're forced
to use this ancient runtime.  I understand this is quite a narrow use case,
which is why I proposed later VC versions as a much wider use case.

I understand supporting ancient runtimes is really a burden on the
maintainers and I am sympathetic to arguments against merging.  I'm happy
enough maintaining a separate fork of these patches myself.  Just thought I
would gauge support for merging upstream.



On Tue, Mar 5, 2019 at 4:43 PM Ben Craig via libcxx-dev <
libcxx-dev at lists.llvm.org> wrote:

> Windows 7 supports the Universal CRT.  It doesn’t come preinstalled on the
> system.  I personally think that it is fine to require users to install a
> C-runtime on windows as part of an install… it’s just the price of doing
> business on that platform.  (alternatively, you can statically link in the
> Universal CRT).
>
>
>
> *From:* libcxx-dev <libcxx-dev-bounces at lists.llvm.org> * On Behalf Of *Shoaib
> Meenai via libcxx-dev
> *Sent:* Tuesday, March 5, 2019 3:15 PM
> *To:* libcxx-dev at lists.llvm.org
> *Subject:* [EXTERNAL] Re: [libcxx-dev] libcxx on MSVC6.0 runtime
>
>
>
> (forwarding this one to the mailing list, since it seems to have gotten
> dropped)
>
>
>
> It’s possible to deploy the Universal CRT to earlier Windows versions
> (including Windows 7), correct? Would that work instead?
>
>
>
> *From: *Brendan Heinonen <brendan at heinonen.co>
> *Date: *Thursday, February 28, 2019 at 9:48 AM
> *To: *Shoaib Meenai <smeenai at fb.com>
> *Subject: *Re: [libcxx-dev] libcxx on MSVC6.0 runtime
>
>
>
> We build against the Windows 7 SDK, which includes the system MSVCRT.
> VC6.0 is a bit of a misnomer, the system MSVCRT is really a fork of VC6
> with some later features mixed in, though VC6 ABI compatibility is
> guaranteed.
>
>
>
> Since we replaced cl.exe with Clang, It’d be nice to get some modern STL
> features too.  The patch would also theoretically enable compatibility for
> MSVC13.0 and below, which is probably a wider use case.
>
>
>
> On Thu, Feb 28, 2019 at 12:35 Shoaib Meenai <smeenai at fb.com> wrote:
>
> What's the motivation here? Is it classic MinGW compatibility (since that
> still uses msvcrt.dll, as far as I know), or something else?
>
>
>
> *From: *libcxx-dev <libcxx-dev-bounces at lists.llvm.org> on behalf of
> Brendan Heinonen via libcxx-dev <libcxx-dev at lists.llvm.org>
> *Reply-To: *Brendan Heinonen <brendan at heinonen.co>
> *Date: *Thursday, February 28, 2019 at 9:21 AM
> *To: *"libcxx-dev at lists.llvm.org" <libcxx-dev at lists.llvm.org>
> *Subject: *[libcxx-dev] libcxx on MSVC6.0 runtime
>
>
>
> Hi,
>
>
>
> After some wrangling, I've managed to get libcxx running, linking against
> the MSVC 6.0 runtime library (yes... from 1998).  Right now, libcxx only
> supports MSVC 14.0 (2015) and above, presumably because the standard
> library did not have complete C99 support.  I'd like to possibly contribute
> these changes, but I have a couple of questions.
>
>
>
> 1. Would there be any interest in these patches, and would there be any
> chance of getting them merged since it would not be standards-compliant
> (due to missing C99+ functions in the runtime)?
>
> 2. If so, what would be the proper way of handling the missing functions?
> Right now, I have solved the missing function declarations by declaring
> them in a "shim" header I created outside libcxx.  Obviously, that's a less
> than ideal solution.  Instead, would wrapping the missing functions with a
> preprocessor if be acceptable?  This would break standards compatibility
> when targeting MSVC 13.0 and below.  Here's an example:
>
>
>
> #ifndef _LIBCPP_VCRUNTIME_NO_C11
> using ::vfscanf;
> using ::vsscanf;
> #endif
>
>
>
> Thanks.
>
>
> --
>
> *Brendan Heinonen*
>
> H6N Technologies, LLC
>
> brendan at heinonen.co
>
> --
>
> *Brendan Heinonen*
>
> H6N Technologies, LLC
>
> +1 (832) 736-4346 | brendan at heinonen.co
> _______________________________________________
> libcxx-dev mailing list
> libcxx-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev
>


-- 
*Brendan Heinonen*
H6N Technologies, LLC
+1 (832) 736-4346 | brendan at heinonen.co
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20190306/75201557/attachment-0001.html>


More information about the libcxx-dev mailing list