[PATCH] cmake: link statically against run-time on windows (use /MT instead of /MD)
alp at nuanti.com
Wed Nov 13 02:31:12 PST 2013
On 13/11/2013 02:04, Hans Wennborg wrote:
> On Tue, Nov 12, 2013 at 4:30 PM, Alp Toker <alp at nuanti.com> wrote:
>> I just noticed it might make sense to do this for /MDd /MTd in _DEBUG as
> Hmm, spontaneously I think this mostly makes sense for release builds,
> since that's what gets distributed, and I'd rather stick to the
> default for debug builds. I don't really have a strong opinion here,
Right. Let's keep DEBUG out for now then. However..
>> Also the MINSIZEREL_INIT cases that slipped in shouldn't be necessary.
> OK, I'll remove those.
>> llvm_replace_compiler_option() does a word replace so the easier way to
>> handle all cases would just be to do the replacement directly, something
>> like the following:
> I kind of like llvm_replace_compiler_option() though, because it will
> add the new option even in cases where the old option didn't exist.
I kind of like the direct replace version, just because it's what's used
in the CMake samples in cmake.git and conceivably if there's no /MD (say
when invoking the MSVC analyzer) it'd be wrong to append /MT.
I'll let you take it from here, from my POV any one of the solutions is
good and we can refine it as we go.
the browser experts
More information about the llvm-commits