[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-29 Thread Ayke via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG75d12e49c729: [libclang] Fall back to getMainExecutable when dladdr fails (authored by aykevl). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-11 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. This file is also linked to `libclang.a`. When linking `libclang.a` on Alpine Linux, `dladdr` is not available and the only fallback I can think of is `getMainExecutable`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12481

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I think the file is linked into `libclang.so`. The resource directory is relative to`libclang.so` but may not be relative to the main executable... So getMainExecutable will be incorrect. Comment at: clang/tools/libclang/CIndexer.cpp:142 +// error

[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails

2022-05-02 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: MaskRay, rsmith. Herald added subscribers: StephenFan, arphaman. Herald added a project: All. aykevl requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. musl-libc doesn't support dladdr in s