[LLVMdev] [cfe-dev] RFC: LLVM should require a working C++11 <thread>, <mutex>, and <atomic>

Szabolcs Nagy nsz at port70.net
Wed Sep 24 06:17:51 PDT 2014


* ?scar Fuentes <ofv at wanadoo.es> [2014-09-24 14:35:17 +0200]:
> MinGW(-w64) is not about compiling "portable" Linux software on Windows,
> it is about compiling Windows API/CRT software on Windows, just like the
> MSVC++ toolchain.

the problem with mingw is that it does not implement the posix api and
thus code is littered with ifdefs or abstraction layers (which are
usually broken), llvm has its own share of ugly and broken ifdefs

most of the problems come from the limitations of the windows c runtime

> IIUC what you propose is another Cygwin that imposes specific
> requirements on how software must be and requires "rebuilding the
> world". No thanks.

the problem with cygwin is that it has global settings and the cygwin
environment might be different on each target machine, it is not a
reliable posix api and the cygwin dll cannot be easily bundled with
an application

but for example if it can be solved that no ifdefs are needed in the
code and there are no dependencies on special global settings
(so applications can assume a reasonable and consistent environment
across all targets) then that could be useful

(and as far as i understand porting musl to the nt kernel makes this
possible: write code for the posix api and run it everywhere, at
least statically linked executables would work that way, cygwin cannot
do that)



More information about the llvm-dev mailing list