2
0
Эх сурвалжийг харах

* don't print a 'smart link requires external linker' warning in _any_ of the
following cases:
1) external linking is already enabled
2) target does not support an internal linker
3) the 'omit linking stage' option is used

git-svn-id: trunk@27543 -

nickysn 11 жил өмнө
parent
commit
015c3269a7

+ 4 - 1
compiler/options.pas

@@ -2747,7 +2747,10 @@ begin
   if ((cs_link_smart in init_settings.globalswitches) or
   if ((cs_link_smart in init_settings.globalswitches) or
       (cs_create_smart in init_settings.moduleswitches)) and
       (cs_create_smart in init_settings.moduleswitches)) and
      (af_needar in target_asm.flags) and
      (af_needar in target_asm.flags) and
-     not (af_smartlink_sections in target_asm.flags) then
+     not (af_smartlink_sections in target_asm.flags) and
+     not (cs_link_extern in init_settings.globalswitches) and
+     (target_info.link<>ld_none) and
+      not (cs_link_nolink in init_settings.globalswitches) then
     begin
     begin
       Message(option_smart_link_requires_external_linker);
       Message(option_smart_link_requires_external_linker);
       include(init_settings.globalswitches,cs_link_extern);
       include(init_settings.globalswitches,cs_link_extern);