Actions
Feature #17741
openRuby links to `objc` for convenience - this should be moved into a native ext
    Feature #17741:
    Ruby links to `objc` for convenience - this should be moved into a native ext
  
Status:
Open
Assignee:
-
Target version:
-
Description
As a convenance to extension developers Ruby on macOS always links to libobjc.  This could be better handled with a native ObjC extension so that one could require 'objc' to add this to the process.
The extension would link to libobjc and provide bindings to objc_msgSend and friends.  By not linking to libobjc we can also avoid linking to libc++abi and all that entails.
This makes ruby on mac more similar to ruby when compiled on other platforms.
Files
        
          
          Updated by mame (Yusuke Endoh) over 4 years ago
          
          
        
        
      
      - Related to Feature #17730: Ruby on macOS transitively links to ~150 dylibs added
 
        
          
          Updated by nobu (Nobuyoshi Nakada) over 4 years ago
          
          
        
        
      
      As far as I remember, I've heard that libobjc needs to be linked against the executable file instead of dynamically loaded modules for startup routines.
I'm not sure if still it is true though.
Actions