* only pass --gc-sections to the linker if smart linking is enabled

(mantis #24396)

git-svn-id: trunk@24465 -
This commit is contained in:
Jonas Maebe 2013-05-07 20:28:54 +00:00
parent 5a4a3cbbc3
commit b16677a75b

View File

@ -1062,7 +1062,8 @@ begin
StripStr:='-s';
if (cs_link_map in current_settings.globalswitches) then
StripStr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'));
if create_smartlink_sections then
if (cs_link_smart in current_settings.globalswitches) and
create_smartlink_sections then
GCSectionsStr:='--gc-sections';
If (cs_profile in current_settings.moduleswitches) or
((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then