Added a little hack that allows to enable runtime optimizations (#1147)

This commit is contained in:
Sergey Bogolepov
2017-12-15 20:46:31 +07:00
committed by Nikolay Igotti
parent 83b595377b
commit 9d14a29f49
2 changed files with 7 additions and 1 deletions
@@ -112,7 +112,7 @@ class CompileCppToBitcode extends DefaultTask {
workingDir objDir
executable "clang++"
args '-std=c++11'
args '-O2'
args compilerArgs
args "-I$headersDir"
+6
View File
@@ -84,6 +84,12 @@ struct FrameOverlay {
ArenaContainer* arena;
};
// A little hack that allows to enable -O2 optimizations
// Prevents clang from replacing FrameOverlay struct
// with single pointer.
// Can be removed when FrameOverlay will become more complex
FrameOverlay exportFrameOverlay;
// Current number of allocated containers.
int allocCount = 0;
int aliveMemoryStatesCount = 0;