[PATCH] D146686: [Driver] Fix rpath for compiler-rt

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 23 09:29:44 PDT 2023


MaskRay added a comment.

In D146686#4216612 <https://reviews.llvm.org/D146686#4216612>, @yaxunl wrote:

> In D146686#4215577 <https://reviews.llvm.org/D146686#4215577>, @MaskRay wrote:
>
>> This change is correct for Linux. `llvm/CMakeLists.txt` says:
>>
>>   if(CMAKE_SYSTEM_NAME MATCHES "BSD|Linux|OS390")
>>     set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default ON)
>>
>> Some rpath using OSes (notably macOS) use LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default=OFF. Is the rpath setting ever usable on macOS?
>> If not, the change is correct.
>
> How about I try to add both? there is check whether the dir exist then adding it, so only the existing one will be added. then it should work in either case.

Yes. Detecting both locations will be nice.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146686/new/

https://reviews.llvm.org/D146686



More information about the cfe-commits mailing list