From d8c77257ea0b0b3a4f92f8ae20b230b545456fa5 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Fri, 3 Jun 2016 13:54:28 -0700 Subject: [PATCH] versioner: whitelist atexit, turn on symbol checking by default. Change-Id: I32e726c74ee618ace3a4329d46408a42732a8d9d --- tools/versioner/src/versioner.cpp | 10 ++++------ tools/versioner/src/versioner.h | 6 ++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/versioner/src/versioner.cpp b/tools/versioner/src/versioner.cpp index bfee6b995..7238a8cf1 100644 --- a/tools/versioner/src/versioner.cpp +++ b/tools/versioner/src/versioner.cpp @@ -485,12 +485,6 @@ static bool checkVersions(const std::set& types, } for (const std::string& symbol_name : completely_unavailable) { - // This currently has some false positives (mostly functions that come from crtbegin). - // Therefore, only report these declarations when running with verbose for now. - if (!verbose) { - break; - } - bool found_inline_definition = false; bool future = false; @@ -515,6 +509,10 @@ static bool checkVersions(const std::set& types, continue; } + if (missing_symbol_whitelist.count(symbol_name) != 0) { + continue; + } + printf("%s: not available in any platform\n", symbol_name.c_str()); failed = true; } diff --git a/tools/versioner/src/versioner.h b/tools/versioner/src/versioner.h index 95635bb1a..ced9b795c 100644 --- a/tools/versioner/src/versioner.h +++ b/tools/versioner/src/versioner.h @@ -20,6 +20,7 @@ #include #include #include +#include extern bool verbose; @@ -55,3 +56,8 @@ static const std::unordered_map> header_black // time64.h #errors when included on LP64 archs. { "time64.h", { "arm64", "mips64", "x86_64" } }, }; + +static const std::unordered_set missing_symbol_whitelist = { + // atexit comes from crtbegin. + "atexit", +}; -- 2.11.0