mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
All modules on Windows need to link against one of {libcmtd.lib, libcmt.lib,
msvcrtd.lib, msvcrt.lib}. In addition to being the C library, it is the
equivalent of crtbegin0.o on other targets. It is responsible for providing the
entry point itself. Traditionally, cl will embed the linkage requirement into
all objects based on the flags given -- one of {/MTd, /MT, /MDd, /MD}. clang
emulates this via the `--dependent-lib=` option. Emulate that behaviour in the
swift driver so that swift objects being compiled for Windows targets can
auto-link to the required libraries.
50 KiB
50 KiB