diff -u -r ../orig-src/llvm/lib/Support/Unix/Path.inc ./llvm/lib/Support/Unix/Path.inc --- ../orig-src/llvm/lib/Support/Unix/Path.inc 2023-09-29 21:36:47.056335287 +0000 +++ ./llvm/lib/Support/Unix/Path.inc 2023-09-29 21:40:31.091417185 +0000 @@ -252,6 +252,7 @@ return exe_path; #elif defined(__linux__) || defined(__CYGWIN__) || defined(__gnu_hurd__) char exe_path[PATH_MAX]; +#ifndef __ANDROID__ /* Avoid looking at /proc/self/exe, as it does not work with termux-exec linker wrapping */ const char *aPath = "/proc/self/exe"; if (sys::fs::exists(aPath)) { // /proc is not always mounted under Linux (chroot for example). @@ -280,6 +281,7 @@ return std::string(real_path); #endif } +#endif // Fall back to the classical detection. if (getprogpath(exe_path, argv0)) return exe_path;