This is an archive of the discontinued LLVM Phabricator instance.

[test][go]Use -stdlib=libc++ to build GO binding test if LLVM is built with libc++
AbandonedPublic

Authored by xingxue on Feb 24 2020, 8:59 AM.

Details

Summary

The recent change in go.test causes the GO binding test to fail if libc++ is used to build LLVM. When LLVM is built against libc++, LLVM libraries, including those used in GO binding test have dependencies on libc++ and C++ STL signatures in these libraries are corresponding to libc++ implementation. Therefore, -stdlib=libc++ is required on the C++ compiler command for building GO binding test that links with these LLVM libraries. Fixed by using --cxxflags as part of the CGO_CXXFLAGS and CGO_LDFLAGS configuration. --cxxflags has -srdlib=libc++ if libc++ is used to build LLVM.

Diff Detail

Event Timeline

xingxue created this revision.Feb 24 2020, 8:59 AM
ldionne removed a subscriber: ldionne.Feb 24 2020, 9:09 AM
xingxue abandoned this revision.Feb 25 2020, 10:33 AM

Revision no longer needed now that the GO binding test code has been reverted. Thanks!