more helpful message when testTlsOffsetAlignment fails

This commit is contained in:
Andrew Kelley
2024-10-23 16:25:37 -07:00
parent 504ad56815
commit 2530d638d6

View File

@@ -3757,11 +3757,15 @@ fn testTlsOffsetAlignment(b: *Build, opts: Options) *Step {
\\#include <pthread.h>
\\#include <dlfcn.h>
\\#include <assert.h>
\\#include <stdio.h>
\\void *(*verify)(void *);
\\
\\int main() {
\\ void *handle = dlopen("liba.so", RTLD_NOW);
\\ assert(handle);
\\ if (!handle) {
\\ fprintf(stderr, "dlopen failed: %s\n", dlerror());
\\ return 1;
\\ }
\\ *(void**)(&verify) = dlsym(handle, "verify");
\\ assert(verify);
\\