mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-26 17:57:07 +00:00
ebfeeec4c4
When testing with sanitizers enabled, we need to link against a plethora of system libraries. Using `-nodefaultlibs` like we used to breaks this, and we would have to add all these system libraries manually, which is not portable and error prone. Instead, stop using `-nodefaultlibs` so that we get the libraries added by default by the compiler. The only caveat with this approach is that we are now relying on the fact that `-L <path-to-local-libunwind>` will cause the just built libunwind to be selected before the system implementation (either of libunwind or libgcc_s.so), which is somewhat fragile. This patch also turns the 32 bit multilib build into a soft failure since we are in the process of removing it anyway, see D114473 for details. This patch is incompatible with the 32 bit multilib build because Ubuntu does not provide a proper libstdc++ for 32 bits, and that is required when running with sanitizers enabled. Differential Revision: https://reviews.llvm.org/D114385
10 lines
176 B
C++
10 lines
176 B
C++
#include <assert.h>
|
|
#include <libunwind.h>
|
|
|
|
int main(int, char**) {
|
|
unw_context_t context;
|
|
int ret = unw_getcontext(&context);
|
|
assert(ret == UNW_ESUCCESS);
|
|
return 0;
|
|
}
|