fix ob_error.cpp file requires at least 20g memory for release(-O2) compilation

fixed (#407)
This commit is contained in:
wenxingsen
2021-10-18 19:51:39 +08:00
committed by wangzelin.wzl
parent 5baefa81ff
commit 65d30fe39f
2 changed files with 10 additions and 0 deletions

View File

@ -311,6 +311,11 @@ print $fh_cpp '/**
#endif #endif
using namespace oceanbase::common; using namespace oceanbase::common;
// fix ob_error.cpp file requires at least 20g memory for release(-O2) compilation
// it can be solved by introducing <iostream> header file temporarily
// TODO: it is clang11 bug, the specific reason to be further located
#include <iostream>
static const char *ERROR_NAME[OB_MAX_ERROR_CODE]; static const char *ERROR_NAME[OB_MAX_ERROR_CODE];
static const char *ERROR_CAUSE[OB_MAX_ERROR_CODE]; static const char *ERROR_CAUSE[OB_MAX_ERROR_CODE];
static const char *ERROR_SOLUTION[OB_MAX_ERROR_CODE]; static const char *ERROR_SOLUTION[OB_MAX_ERROR_CODE];

View File

@ -23,6 +23,11 @@
#endif #endif
using namespace oceanbase::common; using namespace oceanbase::common;
// fix ob_error.cpp file requires at least 20g memory for release(-O2) compilation
// it can be solved by introducing <iostream> header file temporarily
// TODO: it is clang11 bug, the specific reason to be further located
#include <iostream>
static const char *ERROR_NAME[OB_MAX_ERROR_CODE]; static const char *ERROR_NAME[OB_MAX_ERROR_CODE];
static const char *ERROR_CAUSE[OB_MAX_ERROR_CODE]; static const char *ERROR_CAUSE[OB_MAX_ERROR_CODE];
static const char *ERROR_SOLUTION[OB_MAX_ERROR_CODE]; static const char *ERROR_SOLUTION[OB_MAX_ERROR_CODE];