File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ def reconfigure(config, path):
7171 config .toolchain = Path (info ['toolchain' ])
7272 if 'linker' in info and info ['linker' ] is not None :
7373 config .linker = info ['linker' ]
74+ elif config .target is not None :
75+ config .linker = config .target .linker
7476 if 'build_directory' in info and info ['build_directory' ] is not None :
7577 config .build_directory = Path (info ['build_directory' ])
7678 if 'intermediate_directory' in info and info ['intermediate_directory' ] is not None :
@@ -181,7 +183,10 @@ def main():
181183 config .swift_sdk = "/usr"
182184 config .toolchain = Path .path (args .toolchain )
183185 config .pkg_config = args .pkg_config
184- config .linker = args .linker
186+ if args .linker is not None :
187+ config .linker = args .linker
188+ else :
189+ config .linker = config .target .linker
185190 config .bootstrap_directory = Path .path (args .bootstrap )
186191 config .verbose = args .verbose
187192 if config .toolchain is not None :
Original file line number Diff line number Diff line change @@ -331,14 +331,17 @@ class Target:
331331 dynamic_library_suffix = ".dylib"
332332 static_library_prefix = "lib"
333333 static_library_suffix = ".a"
334+ linker = None
334335
335336 def __init__ (self , triple ):
336337 if "linux" in triple :
337338 self .sdk = OSType .Linux
338339 self .dynamic_library_suffix = ".so"
340+ self .linker = "gold"
339341 elif "freebsd" in triple :
340342 self .sdk = OSType .FreeBSD
341343 self .dynamic_library_suffix = ".so"
344+ self .linker = "gold"
342345 elif "windows" in triple or "win32" in triple :
343346 self .sdk = OSType .Win32
344347 self .dynamic_library_suffix = ".dll"
You can’t perform that action at this time.
0 commit comments