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/DeclarationDatabase.cpp b/tools/versioner/src/DeclarationDatabase.cpp
index 8e8d84f..88f7b55 100644
--- a/tools/versioner/src/DeclarationDatabase.cpp
+++ b/tools/versioner/src/DeclarationDatabase.cpp
@@ -288,7 +288,7 @@
 
 std::string to_string(const CompilationType& type) {
   std::stringstream ss;
-  ss << to_string(type.arch) << "-" << type.api_level;
+  ss << to_string(type.arch) << "-" << type.api_level << " [fob = " << type.file_offset_bits << "]";
   return ss.str();
 }
 
diff --git a/tools/versioner/src/DeclarationDatabase.h b/tools/versioner/src/DeclarationDatabase.h
index 8fe12ea..b130ca9 100644
--- a/tools/versioner/src/DeclarationDatabase.h
+++ b/tools/versioner/src/DeclarationDatabase.h
@@ -43,10 +43,11 @@
 struct CompilationType {
   Arch arch;
   int api_level;
+  int file_offset_bits;
 
  private:
   auto tie() const {
-    return std::tie(arch, api_level);
+    return std::tie(arch, api_level, file_offset_bits);
   }
 
  public:
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;