Outils pour utilisateurs

Outils du site


amelioration:taille:c

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
amelioration:taille:c [2017/06/30 21:39] – Ajout de "Fonctions pures virtuelles" rootamelioration:taille:c [2017/09/10 12:35] (Version actuelle) – déplacement pdf root
Ligne 28: Ligne 28:
  
 =====Méthode automatique===== =====Méthode automatique=====
-Options de GCC : ''-ffunction-sections -fdata-sections'' même si la documentation semble dire l'inverse.+Options de GCC ([[https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc.pdf|Using the GNU Compiler Collection]] {{ :prog:gcc:gcc-7.2.0.pdf |Archive}}) : 
 + 
 +''-ffunction-sections -fdata-sections'' même si la documentation semble dire l'inverse.
   g++ -ffunction-sections -fdata-sections -c -o example.o example.cpp   g++ -ffunction-sections -fdata-sections -c -o example.o example.cpp
-<blockquote> When you specify these options, the assembler and linker create larger object and executable files and are also slower.<cite>[[https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Optimize-Options.html|Source]]{{ :amelioration:taille:c:optimize_options_-_using_the_gnu_compiler_collection_gcc_.html.maff |Archive}}</cite></blockquote>+<blockquote> When you specify these options, the assembler and linker create larger object and executable files and are also slower.</blockquote> 
 + 
 +''-fno-enforce-eh-specs'' 
 + 
 +<blockquote>Don’t generate code to check for violation of exception specifications at run timeThis option violates the C++ standardbut may be useful for reducing code size in production builds, much like defining NDEBUGThis does not give user code permission to throw exceptions in violation of the exception specifications; the compiler still optimizes based on the specifications, so throwing an unexpected exception results in undefined behavior at run time.</blockquote>
  
-Option pour le lieur : ''-Wl,--gc-sections''+Option pour le lieur : ''-Wl,%%--%%gc-sections'' ([[https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gnat_ugn.pdf|GNAT User’s Guide for Native Platforms]], {{ :prog:gnat:gnat_ugn-7.2.0.pdf |Archive}})
   g++ -Wl,--gc-sections example_cpp example.o   g++ -Wl,--gc-sections example_cpp example.o
  
amelioration/taille/c.1498851593.txt.gz · Dernière modification : 2017/06/30 21:39 de root