<div dir="ltr">Why does /ZI disable defaultlib pragmas? That's not at all what MSDN says it does:<div><br></div><div><div>/ZI</div><div>Produces a program database, as described above, in a format that supports the Edit and Continue feature. If you want to use Edit and Continue debugging, you must use this option. Because most optimizations are incompatible with Edit and Continue, using /ZI disables any #pragma optimize statements in your code.</div>
<div>/ZI causes /Gy (Enable Function-Level Linking) and /FC (Full Path of Source Code File in Diagnostics) to be used in your compilation.</div><div>/ZI is not compatible with /clr (Common Language Runtime Compilation).</div>
</div><div><br></div><div><a href="http://msdn.microsoft.com/en-us/library/958x11bc.aspx">http://msdn.microsoft.com/en-us/library/958x11bc.aspx</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 6:29 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Test case added in r216665.<br>
<br>
2014-08-28 16:28 GMT+04:00 Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com">timurrrr@google.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> Author: timurrrr<br>
> Date: Thu Aug 28 07:28:04 2014<br>
> New Revision: 216663<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=216663&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=216663&view=rev</a><br>
> Log:<br>
> [ASan/Win] Add the -Zl flag to avoid /DEFAULTLIB:libcmt directive in the asan_win_uar_thunk object file<br>
><br>
> This directive results in 'symbol already defined' when linking DLLs that use -MD<br>
><br>
> Modified:<br>
>     compiler-rt/trunk/lib/asan/CMakeLists.txt<br>
><br>
> Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=216663&r1=216662&r2=216663&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=216663&r1=216662&r2=216663&view=diff</a><br>

> ==============================================================================<br>
> --- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)<br>
> +++ compiler-rt/trunk/lib/asan/CMakeLists.txt Thu Aug 28 07:28:04 2014<br>
> @@ -195,7 +195,7 @@ else()<br>
>        add_dependencies(asan clang_rt.asan_dll_thunk-${arch})<br>
>        add_compiler_rt_runtime(clang_rt.asan_uar_thunk-${arch} ${arch} STATIC<br>
>          SOURCES asan_win_uar_thunk.cc<br>
> -        CFLAGS ${ASAN_CFLAGS} -DASAN_UAR_THUNK<br>
> +        CFLAGS ${ASAN_CFLAGS} -DASAN_UAR_THUNK -Zl<br>
>          DEFS ${ASAN_COMMON_DEFINITIONS})<br>
>        add_dependencies(asan clang_rt.asan_uar_thunk-${arch})<br>
>      endif()<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div>