Skip to content

Commit b4fbf37

Browse files
author
Marcin Babij
committed
Bug#35259704 Windows build with -DWIN_DEBUG_NO_INLINE=1 fails on "library limit of 65535..."
The mysqld.def file is too long, it can't have > 65535 entries. Last time the same problem was improved it was in Bug#33357465, where we disabled std::forward template method instances. However, we did not check if it is in the `std::` namespace, and were cutting out possibly all "forward" methods. Also, we really don't need any std:: methods exported, as they are only part of the standard C++ library. To remove all the std:: methods, we will check unmangled part of the `symbol_line` to look for " __cdecl std::", where the `__cdecl` is function call type modifier which is followed by the name with namespaces. I hope this will not be present in methods which are not in `std::` namespace, but have a template argument to such method. This brings down the number of symbols exported to ~38300, leaving a lot of room for expansion. Change-Id: I9ca13beba02adbfe4daa7d452ad0be803d190440
1 parent 887efea commit b4fbf37

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sql/create_def.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ void Unique_symbol_map::insert(const std::string &symbol_line) {
327327
"_VInfreq_?", // special label (exception handler?) for Intel compiler
328328
"?_E", // vector deleting destructor
329329
"<lambda_", // anything that is lambda-related
330-
"??$forward", // std::forward template instantiations
331330
};
332331
if (symbol_line.find("External") == std::string::npos) {
333332
return;
@@ -372,16 +371,23 @@ void Unique_symbol_map::insert(const std::string &symbol_line) {
372371
}
373372
// Extract the actual symbol name we care about and check it's not on list of
374373
// compiler's symbols.
375-
std::string &symbol = columns[index + 1];
374+
auto &symbol = columns[index + 1];
376375
for (auto &compiler_symbol : compiler_symbols) {
377376
if (symbol.find(compiler_symbol) != std::string::npos) {
378377
return;
379378
}
380379
}
380+
381381
// Check if we have function or data.
382382
if (symbol_line.find("notype () ") == std::string::npos) {
383383
symbol.append(" DATA");
384384
}
385+
386+
// Check if this is a function inside the std namespace
387+
if (symbol_line.find(" __cdecl std::") != std::string::npos) {
388+
return;
389+
}
390+
385391
// Check if this symbol was seen before.
386392
auto res = m_symbols_seen.emplace(symbol);
387393
if (res.second) {

0 commit comments

Comments
 (0)