This is https://bugs.llvm.org//show_bug.cgi?id=38978.
Spec says that:
Objects may be built with the -z nodefaultlib option to suppress any search of the default locations at runtime.
Use of this option implies that all the dependencies of an object can be located using its runpaths.
Without this option, which is the most common case, no matter how you augment the runtime linker's library
search path, its last element is always /usr/lib for 32-bit objects and /usr/lib/64 for 64-bit objects.
(https://www.shrubbery.net/solaris9ab/SUNWdev/LLM/p4.html#CHAPTER2-84569)
The patch implements this option.