[PATCH] D28441: [libc++] [CMake] Link with /nodefaultlibs on Windows

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 7 04:47:33 PST 2017


EricWF added inline comments.


================
Comment at: lib/CMakeLists.txt:113
+  add_library_flags(msvcrt) # C runtime startup files
+  add_library_flags(iso_stdio_wide_specifiers)
+endif()
----------------
halyavin wrote:
> EricWF wrote:
> > smeenai wrote:
> > > Maybe add a comment explaining the purpose of this one as well?
> > Not sure what the comment should read. I originally implemented this patch without this library, but during testing it generated a undefined reference to `___PLEASE_LINK_WITH_iso_stdio_wide_specifiers.lib`.  So should the comment read "MSVC told me to link this"?
> From very few hits Google gave me, it looks like this library implements proper behavior for %s and %c in printfw/scanfw-like functions. 
That would make sense since the undefined symbols were in `locale.cpp`.  I guess I'll update the comment to say "# required for wide character formatting (e.g. `printfw`/`scanfw`)"


https://reviews.llvm.org/D28441





More information about the cfe-commits mailing list