Disable STV on x86 platforms for the Quex lexer

This limits the memory usage peak of GCC 6 based compilers and should
prevent OOM on these platforms.

Change-Id: If727882e05d1fb9881d1ba7c98aa9facb991c2b2
TN: P726-024
This commit is contained in:
Pierre-Marie de Rodat
2016-07-28 13:21:47 +02:00
parent d2e46b9d76
commit dfd0b22ce6

View File

@@ -90,6 +90,8 @@ library project ${lib_name} is
for Object_Dir
use "../../obj/${lib_name.lower()}/" & Library_Kind_Param;
Target := Libadalang'Target;
package Compiler is
Common_Ada_Cargs := ();
@@ -132,12 +134,20 @@ library project ${lib_name} is
-- profiling, for instance.
for Default_Switches ("Ada") use
("-g", "-Ofast", "-gnatp") & Common_Ada_Cargs;
for Default_Switches ("C") use Common_C_Cargs
& ("-Ofast", "-fno-ree", "-fdisable-rtl-cprop_hardreg",
"-fdisable-rtl-sched2");
-- Deactivate because of memory usage, see P726-024. This limits
-- the memory usage peaks of GCC 6 based compilers and should
-- prevent OOM on 32-bit platforms.
for Default_Switches ("C") use Common_C_Cargs & ("-Ofast");
case Target is
when "x86-linux" | "x86-windows" =>
for Switches ("quex_lexer.c") use Common_C_Cargs
& ("-Ofast", "-fno-ree", "-fdisable-rtl-cprop_hardreg",
"-fdisable-rtl-sched2", "-mno-stv");
-- Deactivate because of memory usage, see P726-024. This
-- limits the memory usage peaks of GCC 6 based compilers
-- and should prevent OOM on 32-bit platforms.
when others =>
null;
end case;
end case;
end Compiler;