document-wrapper.h 749 B

12345678910111213141516
  1. #pragma once
  2. // Wrapper file for document.h to fix the crash bug (https://github.com/cocos2d/cocos2d-x/issues/16492)
  3. // Bug in gcc 4.9.0 on ARM with ARM instruction set, -O2 causes the bug
  4. // This gcc version cannot use #pragma GCC push_options/pop_options as well. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884
  5. #include "json/rapidjson.h"
  6. #if defined(__arm__) && defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,9,0) && RAPIDJSON_GNUC < RAPIDJSON_VERSION_CODE(5,0,0)
  7. #pragma GCC optimize ("O1")
  8. #endif
  9. #include "document.h"
  10. #if defined(__arm__) && defined(RAPIDJSON_GNUC) && RAPIDJSON_GNUC >= RAPIDJSON_VERSION_CODE(4,9,0) && RAPIDJSON_GNUC < RAPIDJSON_VERSION_CODE(5,0,0)
  11. #pragma GCC reset_options
  12. #endif