Added a little hack that allows to enable runtime optimizations (#1147)
This commit is contained in:
committed by
Nikolay Igotti
parent
83b595377b
commit
9d14a29f49
@@ -112,7 +112,7 @@ class CompileCppToBitcode extends DefaultTask {
|
||||
workingDir objDir
|
||||
executable "clang++"
|
||||
args '-std=c++11'
|
||||
|
||||
args '-O2'
|
||||
args compilerArgs
|
||||
|
||||
args "-I$headersDir"
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user