[compiler-rt] r216663 - [ASan/Win] Add the -Zl flag to avoid /DEFAULTLIB:libcmt directive in the asan_win_uar_thunk object file

Reid Kleckner rnk at google.com
Thu Aug 28 09:46:33 PDT 2014


Why does /ZI disable defaultlib pragmas? That's not at all what MSDN says
it does:

/ZI
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.
/ZI causes /Gy (Enable Function-Level Linking) and /FC (Full Path of Source
Code File in Diagnostics) to be used in your compilation.
/ZI is not compatible with /clr (Common Language Runtime Compilation).

http://msdn.microsoft.com/en-us/library/958x11bc.aspx


On Thu, Aug 28, 2014 at 6:29 AM, Timur Iskhodzhanov <timurrrr at google.com>
wrote:

> Test case added in r216665.
>
> 2014-08-28 16:28 GMT+04:00 Timur Iskhodzhanov <timurrrr at google.com>:
> > Author: timurrrr
> > Date: Thu Aug 28 07:28:04 2014
> > New Revision: 216663
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=216663&view=rev
> > Log:
> > [ASan/Win] Add the -Zl flag to avoid /DEFAULTLIB:libcmt directive in the
> asan_win_uar_thunk object file
> >
> > This directive results in 'symbol already defined' when linking DLLs
> that use -MD
> >
> > Modified:
> >     compiler-rt/trunk/lib/asan/CMakeLists.txt
> >
> > Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=216663&r1=216662&r2=216663&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
> > +++ compiler-rt/trunk/lib/asan/CMakeLists.txt Thu Aug 28 07:28:04 2014
> > @@ -195,7 +195,7 @@ else()
> >        add_dependencies(asan clang_rt.asan_dll_thunk-${arch})
> >        add_compiler_rt_runtime(clang_rt.asan_uar_thunk-${arch} ${arch}
> STATIC
> >          SOURCES asan_win_uar_thunk.cc
> > -        CFLAGS ${ASAN_CFLAGS} -DASAN_UAR_THUNK
> > +        CFLAGS ${ASAN_CFLAGS} -DASAN_UAR_THUNK -Zl
> >          DEFS ${ASAN_COMMON_DEFINITIONS})
> >        add_dependencies(asan clang_rt.asan_uar_thunk-${arch})
> >      endif()
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140828/9cb57707/attachment.html>


More information about the llvm-commits mailing list