<div dir="ltr"><p>Hi Everyone</p><div>Change r191397 affected the libcxx test suite results on my windows machine for g++ and mingw (and possibly eventually VS) builds.</div><div><br>The comment is:</div><div>"Make the guard for external ABI libraries include the guard for<br>
 libsupc++ in typeinfo.cpp, bringing it into agreement with<br>exception.cpp. This fixes link errors due to duplicate symbols from<br>this translation unit."</div><div> </div><div>I don't know that r191397 is wrong but after applying that change I noticed some additional test suite failures. One example:<br>
c:\libcxx\test\language.support\support.rtti\bad.cast\bad_cast.pass.cpp</div><p>which now results in a linker error where it previously compiled. The linker error is:<br>"undefined reference to std::bad_cast::bad_cast()"</p>
<p>Another test case may be similarly effected is:<br>/libcxx/test/language.support/support.rtti/bad.typeid/bad_typeid.pass.cpp</p><p>Looking at the change, it's because libcxx/src/type_info.cpp was changed from this:<br>
#if !(defined(_LIBCPPABI_VERSION) || defined(LIBCXXRT))</p><p>to this:<br>#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)</p><p>and on my builds this now blocks out the definitions for bad_cast and type_info constructors etc. This would account for the linker error, as on my machine LIBCXXRT is not defined && LIBCPPABI_VERSION is not defined either.</p>
<p>A grep of _LIBCPPABI_VERSION in the libcxx code base shows a few references to other code that may be of interest here.<br>My machine has cxxabi.h which appears possibly also of interest.</p><div>Does anyone know what should be linked in to the above mentioned test cases to restore the bad_cast and type_info definitions for g++/mingw/vs if they are not to be provided by libcxx, so as to make the libcxx test cases compile again?</div>
<div> </div><div>Alternatively if r191397 is incorrect / insufficient, what should be changed in libcxx or the changed guard mentioned above, that will re-enable libcxx to again provide these definitions if it should?</div>
<div> </div><div>Thanks</div><div> </div></div>