[Driver] Fix rpath for compiler-rt
The compiler-rt library path can be either {resource_dir}/lib/{triple} or {resource_dir}/lib/{OS}/{arch} depending on whether LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default is ON or OFF. Currently, the rpath added by -rtlib-add-rpath only adds the latter. This patch checks both and adds the one that exists. Reviewed by: Fangrui Song Differential Revision: https://reviews.llvm.org/D146686
Loading
Please sign in to comment