Path: blob/main/crypto/openssl/Configurations/50-win-hybridcrt.conf
34869 views
## -*- mode: perl; -*-1# Windows HybridCRT targets.2#3# https://github.com/microsoft/WindowsAppSDK/blob/77761e244289fda6b3d5f14c7bded189fed4fb89/docs/Coding-Guidelines/HybridCRT.md4# Link statically against the runtime and STL, but link dynamically against the CRT by ignoring the static CRT5# lib and instead linking against the Universal CRT DLL import library. This "Hybrid" linking mechanism is6# supported according to the CRT maintainer. Dynamic linking against the CRT makes the binaries a bit smaller7# than they would otherwise be if the CRT, runtime, and STL were all statically linked in.8910sub remove_from_flags {11my ($toRemove, $flags) = @_;1213$flags =~ s/$toRemove//;14return $flags;15}1617my %targets = (18"VC-WIN32-HYBRIDCRT" => {19inherit_from => [ "VC-WIN32" ],20cflags => sub {21remove_from_flags(qr/\/MDd?\s/, add(picker(debug => "/MTd",22release => "/MT"))->(@_))23},24lflags => add(picker(debug => "/NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib",25release => "/NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")),26},27"VC-WIN64A-HYBRIDCRT" => {28inherit_from => [ "VC-WIN64A" ],29cflags => sub {30remove_from_flags(qr/\/MDd?\s/, add(picker(debug => "/MTd",31release => "/MT"))->(@_))32},33lflags => add(picker(debug => "/NODEFAULTLIB:libucrtd.lib /DEFAULTLIB:ucrtd.lib",34release => "/NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")),35},36);373839