Add missing arch types and set it in system_profile.
Change-Id: I31cdb341dd78289818f6a78e340acca8fa09e987
Reviewed-on: https://fuchsia-review.googlesource.com/c/cobalt/+/513860
Commit-Queue: Steve Fung <stevefung@google.com>
Reviewed-by: Steve Fung <stevefung@google.com>
diff --git a/src/pb/common.proto b/src/pb/common.proto
index de1189c..dda8cf7 100644
--- a/src/pb/common.proto
+++ b/src/pb/common.proto
@@ -40,7 +40,8 @@
UNKNOWN_ARCH = 0;
X86_64 = 1;
ARM_64 = 2;
- X86 = 3;
+ X86_32 = 3;
+ ARM_32 = 4;
}
enum BuildType {
diff --git a/src/system_data/system_data.cc b/src/system_data/system_data.cc
index 50707fc..b80f5cb 100644
--- a/src/system_data/system_data.cc
+++ b/src/system_data/system_data.cc
@@ -205,10 +205,17 @@
system_profile_.set_arch(SystemProfile::X86_64);
+#elif defined(__i386__)
+
+ system_profile_.set_arch(SystemProfile::X86_32);
#elif defined(__aarch64__)
system_profile_.set_arch(SystemProfile::ARM_64);
+#elif defined(__arm__)
+
+ system_profile_.set_arch(SystemProfile::ARM_32);
+
#else
system_profile_.set_arch(SystemProfile::UNKNOWN_ARCH);