versioner: handle _FILE_OFFSET_BITS=64.
Compile headers with both -D_FILE_OFFSET_BITS=32 and -D_FILE_OFFSET_BITS=64.
Bug: http://b/30170081
Change-Id: I92651e075cc69bdc1a2581f99892c9a7fdcdb35b
Test: python run_tests.py
diff --git a/tools/versioner/src/versioner.cpp b/tools/versioner/src/versioner.cpp
index b18c3c2..432fd66 100644
--- a/tools/versioner/src/versioner.cpp
+++ b/tools/versioner/src/versioner.cpp
@@ -89,6 +89,8 @@
command.push_back(std::move(header_path));
}
+ command.push_back("-D_FILE_OFFSET_BITS="s + std::to_string(type.file_offset_bits));
+
return CompileCommand(cwd, filename, command);
}
@@ -184,8 +186,13 @@
if (api_level < min_api) {
continue;
}
- CompilationType type = { .arch = arch, .api_level = api_level };
- result.insert(type);
+
+ for (int file_offset_bits : { 32, 64 }) {
+ CompilationType type = {
+ .arch = arch, .api_level = api_level, .file_offset_bits = file_offset_bits
+ };
+ result.insert(type);
+ }
}
}
return result;