[Bf-blender-cvs] [e1e3043a51a] master: CMake: resolve issue finding mold
Campbell Barton
noreply at git.blender.org
Mon Jan 17 08:12:33 CET 2022
Commit: e1e3043a51a6f88b3a79b935678464a06c2e469f
Author: Campbell Barton
Date: Mon Jan 17 18:07:12 2022 +1100
Branches: master
https://developer.blender.org/rBe1e3043a51a6f88b3a79b935678464a06c2e469f
CMake: resolve issue finding mold
The default installation path uses `libexec`, missed this as the
package for Arch replaces this with `lib`,
now both are checked.
===================================================================
M build_files/cmake/platform/platform_unix.cmake
===================================================================
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 43dbc7c9c98..b6da737af71 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -700,14 +700,18 @@ if(CMAKE_COMPILER_IS_GNUCC)
find_path(
MOLD_BIN_DIR "ld"
HINTS "${MOLD_PREFIX}"
- PATH_SUFFIXES "lib/mold" "lib64/mold"
+ # The default path is `libexec`, Arch Linux for e.g.
+ # replaces this with `lib` so check both.
+ PATH_SUFFIXES "libexec/mold" "lib/mold" "lib64/mold"
NO_DEFAULT_PATH
NO_CACHE
)
if(NOT MOLD_BIN_DIR)
message(STATUS
"The mold linker could not find the directory containing the linker command "
- "(typically \"${MOLD_PREFIX}/lib/mold\"), using system linker.")
+ "(typically "
+ "\"${MOLD_PREFIX}/libexec/mold/ld\") or "
+ "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker.")
set(WITH_LINKER_MOLD OFF)
endif()
unset(MOLD_PREFIX)
More information about the Bf-blender-cvs
mailing list