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

2023-04-05 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG5f91c747763c: [Driver] Fix rpath for compiler-rt (authored by yaxunl). Herald added a project: clang. Chang

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

2023-04-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:638 + AddPath({getOSLibName(), llvm::Triple::getArchTypeName(getArch())}); + + return Paths; MaskRay wrote: > unneeded blank line will remove when

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

2023-03-30 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChain.cpp:638 + AddPath({getOSLibName(), llvm::Triple::getArchTypeName(getArch())}); + + return Paths; unneeded blan

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

2023-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 508823. yaxunl added a comment. revised by Fangrui's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146686/new/ https://reviews.llvm.org/D146686 Files: clang/include/clang/Driver/ToolChain.h clang/lib/Driver/ToolChain.cpp clang/lib/Dri

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

2023-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/OHOS.cpp:140 getFilePaths().clear(); - std::string CandidateLibPath = getArchSpecificLibPath(); - if (getVFS().exists(CandidateLibPath)) -getFilePaths().push_back(CandidateLibPath); + for (const auto

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

2023-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The new test can be placed in `arch-specific-libdir-rpath.c`. One or two additional RUN lines seem sufficient, no need to duplicate too many. Also, use `--target=` for new tests and avoid `^//$`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146686/new/ https:

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

2023-03-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 508312. yaxunl edited the summary of this revision. yaxunl added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: jplehr, sstefan1. adds check for both {resource_dir}/lib/{triple} and {resource_dir}/lib/{OS}/{arch} CHANGES SINCE LAST

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

2023-03-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D146686#4216612 , @yaxunl wrote: > In D146686#4215577 , @MaskRay wrote: > >> This change is correct for Linux. `llvm/CMakeLists.txt` says: >> >> if(CMAKE_SYSTEM_NAME MATCHES "BSD|Linu

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

2023-03-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In 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 usin

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

2023-03-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. 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

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

2023-03-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: MaskRay, tra. Herald added a subscriber: dberris. Herald added a project: All. yaxunl requested review of this revision. The compiler-rt library path has changed to {resource_dir}/lib/{triple} from {resource_dir}/lib/{OS}/{arch} but the rpath h