Skip to content
  • Alexey Matveichev's avatar
    fb2b3a6f
    COMP: add rpath information to MacOS compilation rules (#2948) · fb2b3a6f
    Alexey Matveichev authored and Mark OLESEN's avatar Mark OLESEN committed
    - 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
    fb2b3a6f
    COMP: add rpath information to MacOS compilation rules (#2948)
    Alexey Matveichev authored and Mark OLESEN's avatar Mark OLESEN committed
    - 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
Loading