Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |
amelioration:taille:c [2017/09/10 12:23] – maff => mhtml root | amelioration:taille:c [2017/09/10 12:35] (Version actuelle) – déplacement pdf root |
---|
| |
=====Méthode automatique===== | =====Méthode automatique===== |
Options de GCC ([[https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc.pdf|Using the GNU Compiler Collection]] {{ :amelioration:taille:c:gcc-7.2.0.pdf |Archive}}) : | 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. | ''-ffunction-sections -fdata-sections'' même si la documentation semble dire l'inverse. |
<blockquote>Don’t generate code to check for violation of exception specifications at run time. This option violates the C++ standard, but may be useful for reducing code size in production builds, much like defining NDEBUG. This 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> | <blockquote>Don’t generate code to check for violation of exception specifications at run time. This option violates the C++ standard, but may be useful for reducing code size in production builds, much like defining NDEBUG. This 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'' ([[https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gnat_ugn.pdf|GNAT User’s Guide for Native Platforms]], {{ :amelioration:taille:c:gnat_ugn-7.2.0.pdf |Archive}}) | 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 |
| |