aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorIzaak Schroeder <izaak.schroeder@gmail.com>2024-07-06 16:01:59 -0700
committerGitHub <noreply@github.com>2024-07-06 16:01:59 -0700
commitb151c7e36a26a4168d0384c88295099e4b6470d0 (patch)
tree019c1086e9cf472e4bfd66d8730d2fc4459dbff9 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parentf4e6ddbc2ed77ef73a036408f1d04bb792e2d357 (diff)
downloadllvm-b151c7e36a26a4168d0384c88295099e4b6470d0.zip
llvm-b151c7e36a26a4168d0384c88295099e4b6470d0.tar.gz
llvm-b151c7e36a26a4168d0384c88295099e4b6470d0.tar.bz2
[libc] Add `dlfcn.h` placeholder (#97501)
Adds `dlopen` and friends. This is needed as part of the effort to compile `libunwind` + `libc` without baremetal mode. This is part of https://github.com/llvm/llvm-project/issues/97191. This should still be spec compliant, since `dlopen` always returns `NULL` and `dlerror` always returns an error message. > If dlopen() fails for any reason, it returns NULL. > The function dlclose() returns 0 on success, and nonzero on error. > Since the value of the symbol could actually be NULL (so that a NULL return from dlsym() need not indicate an error), the correct way to test for an error is to call dlerror() to clear any old error conditions, then call dlsym(), and then call dlerror() again, saving its return value into a variable, and check whether this saved value is not NULL. See: - https://linux.die.net/man/3/dlopen
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions