File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,16 @@ be ignored in favor of only building the artifacts specified by command line.
5252  compiled as dynamic libraries) will have to be specified manually when
5353  linking that static library from somewhere. The ` --print=native-static-libs `  flag may help with this.
5454
55+   Note that, because the resulting static library contains the code of all the
56+   dependencies, including the standard library, and also exports all public
57+   symbols of them, linking the static library into an executable or shared
58+   library may need special care. In case of a shared library the list of
59+   exported symbols will have to be limited via e.g. a linker or symbol version
60+   script, exported symbols list (macOS), or module definition file (Windows).
61+   Additionally, unused sections can be removed to remove all code of
62+   dependencies that is not actually used (e.g. ` --gc-sections `  or ` -dead_strip ` 
63+   for macOS).
64+ 
5565*  ` --crate-type=cdylib ` , ` #![crate_type = "cdylib"] `  - A dynamic system
5666  library will be produced.  This is used when compiling
5767  a dynamic library to be loaded from another language.  This output type will
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments