quinnp created this revision. Herald added subscribers: steven.zhang, shchenz, kbarton, nemanjai. Herald added a project: All. quinnp requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang.
This patch changes the default linker for `clang` on PowerPC Linux to `lld`. Here is a summary of the expected behaviour before and after this patch: To use `lld` as the linker before this patch: - build with `lld` in `LLVM_ENABLE_PROJECTS` - build with `-DCLANG_DEFAULT_LINKER=lld` To use `lld` as the linker after this patch: - build with `lld` in `LLVM_ENABLE_PROJECTS` To use `ld` as the linker before this patch: - default behaviour To use `ld` as the linker after this patch: - build with `-DCLANG_DEFAULT_LINKER=<PATH_TO_LD>` Note: After this patch, if you build `clang` for PowerPC Linux and `lld` is not included in `LLVM_ENABLE_PROJECTS`, the built compiler will report an error during linking on PowerPC Linux. Therefore, anyone using the default behaviour before this patch will need to modify their build configuration to either: - include `-DCLANG_DEFAULT_LINKER=<PATH_TO_LD>` to continue using `ld` or - `lld` in `LLVM_ENABLE_PROJECTS` to switch to `lld`. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D129855 Files: clang/lib/Driver/ToolChains/PPCLinux.h Index: clang/lib/Driver/ToolChains/PPCLinux.h =================================================================== --- clang/lib/Driver/ToolChains/PPCLinux.h +++ clang/lib/Driver/ToolChains/PPCLinux.h @@ -24,6 +24,8 @@ AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; + const char *getDefaultLinker() const override { return "ld.lld"; } + private: bool SupportIEEEFloat128(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) const;
Index: clang/lib/Driver/ToolChains/PPCLinux.h =================================================================== --- clang/lib/Driver/ToolChains/PPCLinux.h +++ clang/lib/Driver/ToolChains/PPCLinux.h @@ -24,6 +24,8 @@ AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override; + const char *getDefaultLinker() const override { return "ld.lld"; } + private: bool SupportIEEEFloat128(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args) const;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits