diff --git a/util/mac/mac_util.cc b/util/mac/mac_util.cc index 6cf02de8..cd6669c4 100644 --- a/util/mac/mac_util.cc +++ b/util/mac/mac_util.cc @@ -31,6 +31,7 @@ #include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" +#include "build/build_config.h" #include "util/mac/sysctl.h" extern "C" { @@ -328,8 +329,17 @@ void MacModelAndBoard(std::string* model, std::string* board_id) { if (platform_expert) { model->assign( IORegistryEntryDataPropertyAsString(platform_expert, CFSTR("model"))); +#if defined(ARCH_CPU_X86_FAMILY) + CFStringRef kBoardProperty = CFSTR("board-id"); +#elif defined(ARCH_CPU_ARM64) + // TODO(https://crashpad.chromium.org/bug/352): When production arm64 + // hardware is available, determine whether board-id works and switch to it + // if feasible, otherwise, determine whether target-type remains a viable + // alternative. + CFStringRef kBoardProperty = CFSTR("target-type"); +#endif board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert, - CFSTR("board-id"))); + kBoardProperty)); } else { model->clear(); board_id->clear();