COMP: add rpath information to MacOS compilation rules (#2948)
- Since the Apple SIP (System Integrity Protection) clears environment variables such as DYLD_LIBRARY_PATH env variable, a number of workarounds have been used to provide shadow values. However, for a more robust installation using the -rpath at compilation time appears to be the best solution. Add MacOS-specific rpath handling (@loader_path, @executable_path) to the wmake rules. Library paths handled: - FOAM_USER_LIBBIN - FOAM_SITE_LIBBIN - FOAM_FOAM_EXT_LIBBIN, FOAM_EXT_LIBBIN/FOAM_MPI - FOAM_LIBBIN (implicitly) The executable rpaths are handled assuming a structure of install-path/bin install-path/lib - no rpath added for c-only compilations since there are currently no c-only libraries or executables with dynamic loading The current default for MacOS is the link with rpath information. This can be disabled by including `~rpath` in the WM_COMPILE_CONTROL
Showing
- wmake/rules/darwin64Clang/c++ 9 additions, 3 deletionswmake/rules/darwin64Clang/c++
- wmake/rules/darwin64Clang/link-c++ 9 additions, 0 deletionswmake/rules/darwin64Clang/link-c++
- wmake/rules/darwin64Clang/link-rpath-c++ 15 additions, 0 deletionswmake/rules/darwin64Clang/link-rpath-c++
- wmake/rules/darwin64Clang/rpath 30 additions, 0 deletionswmake/rules/darwin64Clang/rpath
wmake/rules/darwin64Clang/link-c++
0 → 100644
wmake/rules/darwin64Clang/link-rpath-c++
0 → 100644
wmake/rules/darwin64Clang/rpath
0 → 100644
Please register or sign in to comment