Add option to parse version script during linking.
1) Add option to parse version script file specifying exported symbols and variables during link time. 2) Added test version script file. 3) Minor style cleanup. 4) Remove HandleVTable as it is no longer needed. 5) header-abi-diff has a mode to enable advice-only mode. This means no failures on abi extensions / incompatiblity. Only report generation. 5) Seperate out functionality into util lib. Test: 1) header-abi-dumper -o example1.dump tests/input/example1.cpp -I tests -- -x c++ -std=c++11 -I . -I ~/android/aosp/external/clang/lib/Headers 2) header-abi-linker -o test.lsdump example1.dump -v tests/input/test_version_script.map -arch arm64 -api 24, test.lsdump has only the symbols specified by test_version_script.amp Change-Id: Ib539db4a886abe4917e09cd8643ab35ffecb0df1
This commit is contained in:
@@ -32,6 +32,10 @@ static llvm::cl::opt<std::string> old_dump(
|
||||
"old", llvm::cl::desc("<old dump>"), llvm::cl::Required,
|
||||
llvm::cl::cat(header_checker_category));
|
||||
|
||||
static llvm::cl::opt<bool> advice_only(
|
||||
"advice-only", llvm::cl::desc("Advisory mode only"), llvm::cl::Optional,
|
||||
llvm::cl::cat(header_checker_category));
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv, "header-checker");
|
||||
@@ -53,6 +57,9 @@ int main(int argc, const char **argv) {
|
||||
<< " Please check compatiblity report at : "
|
||||
<< compatibility_report << "\n"
|
||||
<< "*****************************************************\n";
|
||||
if (!advice_only) {
|
||||
return extension_or_incompatible;
|
||||
}
|
||||
}
|
||||
return extension_or_incompatible;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user