@@ -628,18 +628,20 @@ def link_program(self, r, tmp_path, name):
628
628
bin = None if ext == 'elf' else full_path
629
629
map = join (tmp_path , name + '.map' )
630
630
631
- objects = sorted (set (r .objects ))
631
+ objects = sorted (set ([path for _ , path
632
+ in r .get_file_refs (FileType .OBJECT )]))
632
633
config_file = ([self .config .app_config_location ]
633
634
if self .config .app_config_location else [])
634
635
linker_script = [path for _ , path in r .get_file_refs (FileType .LD_SCRIPT )
635
636
if path .endswith (self .LINKER_EXT )][- 1 ]
636
637
lib_dirs = [path for _ , path in r .get_file_refs (FileType .LIB_DIR )]
637
- dependencies = objects + r .libraries + [linker_script ] + config_file
638
+ libraries = [path for _ , path in r .get_file_refs (FileType .LIB )]
639
+ dependencies = objects + libraries + [linker_script ] + config_file
638
640
dependencies .append (join (self .build_dir , self .PROFILE_FILE_NAME + "-ld" ))
639
641
if self .need_update (elf , dependencies ):
640
642
needed_update = True
641
643
self .progress ("link" , name )
642
- self .link (elf , objects , r . libraries , lib_dirs , linker_script )
644
+ self .link (elf , objects , libraries , lib_dirs , linker_script )
643
645
644
646
if bin and self .need_update (bin , [elf ]):
645
647
needed_update = True
0 commit comments