This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] Provide __internal_dup on Solaris
ClosedPublic

Authored by ro on Mar 31 2019, 3:00 AM.

Details

Summary

Both LLVM 8.0.0 and current trunk fail to link `libclang_rt.ubsan.standalone-*.so```
on Solaris 11/x86 with GCC 8.1.0:

Undefined			first referenced
 symbol  			    in file
Scanning dependencies of target clang_rt.asan_cxx-x86_64
__sanitizer::internal_dup(int)      ../sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_posix.cc.o
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
make[2]: *** [projects/compiler-rt/lib/ubsan/CMakeFiles/clang_rt.ubsan_standalone-dynamic-i386.dir/build.make:233: lib/clang/9.0.0/lib/sunos/libclang_rt.ubsan_standalone-i386.so] Error 1

Fixed by providing an implementation, which allowed the i386-pc-solaris2.11 build
to finish.

Diff Detail

Event Timeline

ro created this revision.Mar 31 2019, 3:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2019, 3:00 AM
Herald added subscribers: Restricted Project, jdoerfert, fedor.sergeev, kubamracek. · View Herald Transcript

Ping. Given that this patch is Solaris-only, I guess it could go in as obvious?

eugenis accepted this revision.Apr 4 2019, 11:30 AM
eugenis added a subscriber: eugenis.

Yes, seems pretty obvious.
LGTM.

This revision is now accepted and ready to land.Apr 4 2019, 11:30 AM
This revision was automatically updated to reflect the committed changes.