diff options
Diffstat (limited to 'src/Linker.cpp')
-rw-r--r-- | src/Linker.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Linker.cpp b/src/Linker.cpp index 7d90d46..d03e3a4 100644 --- a/src/Linker.cpp +++ b/src/Linker.cpp @@ -4,9 +4,9 @@ static void split_string(const std::string &str, char delimiter, std::function<bool(const char*,size_t)> callback) { size_t index = 0; while(index < str.size()) { - const size_t end_index = str.find(delimiter, index); + size_t end_index = str.find(delimiter, index); if(end_index == std::string::npos) - break; + end_index = str.size(); if(!callback(&str[index], end_index - index)) break; @@ -46,4 +46,8 @@ namespace sibs bool is_lld_linker_installed() { return is_linker_installed("ld.lld"); } + + bool is_mold_linker_installed() { + return is_linker_installed("ld.mold") && fileExists("/usr/lib/mold/ld"); + } }
\ No newline at end of file |