configure.ac: disable C++ RTTI
RTTI adds overhead to the binary, and we don't need that.
This commit is contained in:
parent
a6371e2e66
commit
83c7e1e129
@ -1542,6 +1542,7 @@ if test "x$enable_debug" = xno; then
|
|||||||
AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
|
AX_APPEND_COMPILE_FLAGS([-fno-threadsafe-statics])
|
||||||
AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
|
AX_APPEND_COMPILE_FLAGS([-fmerge-all-constants])
|
||||||
AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
|
AX_APPEND_COMPILE_FLAGS([-fno-exceptions])
|
||||||
|
AX_APPEND_COMPILE_FLAGS([-fno-rtti])
|
||||||
AC_LANG_POP
|
AC_LANG_POP
|
||||||
|
|
||||||
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
|
AX_APPEND_LINK_FLAGS([-Wl,--gc-sections])
|
||||||
|
@ -49,6 +49,7 @@ extern "C" {
|
|||||||
|
|
||||||
static Database *db;
|
static Database *db;
|
||||||
static bool db_is_open;
|
static bool db_is_open;
|
||||||
|
static bool is_simple;
|
||||||
|
|
||||||
bool
|
bool
|
||||||
db_init(const struct config_param *param, GError **error_r)
|
db_init(const struct config_param *param, GError **error_r)
|
||||||
@ -58,6 +59,8 @@ db_init(const struct config_param *param, GError **error_r)
|
|||||||
|
|
||||||
const char *plugin_name =
|
const char *plugin_name =
|
||||||
config_get_block_string(param, "plugin", "simple");
|
config_get_block_string(param, "plugin", "simple");
|
||||||
|
is_simple = strcmp(plugin_name, "simple") == 0;
|
||||||
|
|
||||||
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
|
const DatabasePlugin *plugin = GetDatabasePluginByName(plugin_name);
|
||||||
if (plugin == NULL) {
|
if (plugin == NULL) {
|
||||||
g_set_error(error_r, db_quark(), 0,
|
g_set_error(error_r, db_quark(), 0,
|
||||||
@ -104,7 +107,7 @@ db_is_simple(void)
|
|||||||
{
|
{
|
||||||
assert(db == NULL || db_is_open);
|
assert(db == NULL || db_is_open);
|
||||||
|
|
||||||
return dynamic_cast<SimpleDatabase *>(db) != nullptr;
|
return is_simple;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct directory *
|
struct directory *
|
||||||
|
Loading…
Reference in New Issue
Block a user