Move over to ABSL logging and flags.
Removes gperftools too since that wants gflags.
Here come the fireworks.
Change-Id: I79cb7bcf60f1047fbfa28bfffc21a0fd692e4b1c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/network/message_bridge_client.cc b/aos/network/message_bridge_client.cc
index 4a1992a..e6b71ea 100644
--- a/aos/network/message_bridge_client.cc
+++ b/aos/network/message_bridge_client.cc
@@ -1,3 +1,5 @@
+#include "absl/flags/flag.h"
+
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
#include "aos/logging/dynamic_logging.h"
@@ -6,11 +8,10 @@
#include "aos/sha256.h"
#include "aos/util/file.h"
-DEFINE_string(config, "aos_config.json", "Path to the config.");
-DEFINE_int32(rt_priority, -1, "If > 0, run as this RT priority");
-DEFINE_bool(
- wants_sctp_authentication, false,
- "When set, try to use SCTP authentication if provided by the kernel");
+ABSL_FLAG(std::string, config, "aos_config.json", "Path to the config.");
+ABSL_FLAG(int32_t, rt_priority, -1, "If > 0, run as this RT priority");
+ABSL_FLAG(bool, wants_sctp_authentication, false,
+ "When set, try to use SCTP authentication if provided by the kernel");
namespace aos::message_bridge {
@@ -18,15 +19,15 @@
int Main() {
aos::FlatbufferDetachedBuffer<aos::Configuration> config =
- aos::configuration::ReadConfig(FLAGS_config);
+ aos::configuration::ReadConfig(absl::GetFlag(FLAGS_config));
aos::ShmEventLoop event_loop(&config.message());
- if (FLAGS_rt_priority > 0) {
- event_loop.SetRuntimeRealtimePriority(FLAGS_rt_priority);
+ if (absl::GetFlag(FLAGS_rt_priority) > 0) {
+ event_loop.SetRuntimeRealtimePriority(absl::GetFlag(FLAGS_rt_priority));
}
MessageBridgeClient app(&event_loop, Sha256(config.span()),
- FLAGS_wants_sctp_authentication
+ absl::GetFlag(FLAGS_wants_sctp_authentication)
? SctpAuthMethod::kAuth
: SctpAuthMethod::kNoAuth);