ART: Fix for no-opt debug (-O0) builds
Currently, the build process of debug builds with no optimization fails
due to missing symbol definitions.
For example, it throws errors like the following one:
ld.lld: error:
undefined symbol:
art::gc::collector::MarkSweep::MarkStackTask<false>::kMaxSize
This patch changes the missing symbols from constants to constant
expressions as a way to fix those issues. The optimized builds
get away with this issue because the values are optimized
to be inlined and not referenced.
The code at https://godbolt.org/z/3oYKoPzGj depicts similar
behaviour. Additionally, there are comments describing why
this issue occurs.
Test: ART_DEBUG_OPT_FLAG="-O0" art/tools/buildbot-build.sh --host
Change-Id: I66b5cfc885dfdfc82e3e4008b1e40fd68c19c999
5 files changed