File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ ## 0.2.4+1  
2+ 
3+ -  Explicitly tell linker to create position dependent or position independent executable
4+   ([ #113  ] ( https://github.com/dart-lang/native/issues/133 ) ).
5+ 
16## 0.2.4  
27
38-  Added ` includes `  for specifying include directories.
Original file line number Diff line number Diff line change @@ -161,14 +161,18 @@ class RunCBuilder {
161161            // which the static library is linked is PIC, PIE or neither. Then 
162162            // we could use the same option for the static library. 
163163            if  (staticLibrary !=  null ) '-fPIC' ,
164-             if  (executable !=  null ) '-fPIE' ,
164+             if  (executable !=  null ) ...[
165+               // Generate position-independent code for executables. 
166+               '-fPIE' ,
167+               // Tell the linker to generate a position-independent executable. 
168+               '-pie' ,
169+             ],
165170          ] else  ...[
171+             // Disable generation of any kind of position-independent code. 
166172            '-fno-PIC' ,
167173            '-fno-PIE' ,
168-             if  (compiler.tool ==  clang) ...[
169-               '-z' ,
170-               'notext' ,
171-             ]
174+             // Tell the linker to generate a position-dependent executable. 
175+             if  (executable !=  null ) '-no-pie' ,
172176          ],
173177        if  (std !=  null ) '-std=$std ' ,
174178        if  (language ==  Language .cpp) ...[
Original file line number Diff line number Diff line change 11name : native_toolchain_c 
22description : >- 
33  A library to invoke the native C compiler installed on the host machine. 
4- version : 0.2.4 
4+ version : 0.2.4+1  
55repository : https://github.com/dart-lang/native/tree/main/pkgs/native_toolchain_c 
66
77topics :
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments