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/containers/BUILD b/aos/containers/BUILD
index c0b365c..8da9218 100644
--- a/aos/containers/BUILD
+++ b/aos/containers/BUILD
@@ -17,7 +17,8 @@
deps = [
":ring_buffer",
"//aos/testing:googletest",
- "@com_github_google_glog//:glog",
+ "@com_google_absl//absl/log",
+ "@com_google_absl//absl/log:check",
],
)
@@ -61,6 +62,7 @@
":inlined_vector",
"//aos:realtime",
"//aos/testing:googletest",
+ "@com_google_absl//absl/flags:reflection",
],
)
@@ -117,7 +119,8 @@
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
- "@com_github_google_glog//:glog",
+ "@com_google_absl//absl/log",
+ "@com_google_absl//absl/log:check",
],
)
diff --git a/aos/containers/inlined_vector_test.cc b/aos/containers/inlined_vector_test.cc
index b8aab6b..d2d9af6 100644
--- a/aos/containers/inlined_vector_test.cc
+++ b/aos/containers/inlined_vector_test.cc
@@ -1,19 +1,21 @@
#include "aos/containers/inlined_vector.h"
-#include "gflags/gflags.h"
+#include "absl/flags/declare.h"
+#include "absl/flags/flag.h"
+#include "absl/flags/reflection.h"
#include "gtest/gtest.h"
#include "aos/realtime.h"
-DECLARE_bool(die_on_malloc);
+ABSL_DECLARE_FLAG(bool, die_on_malloc);
namespace aos::testing {
// Checks that we don't malloc until/unless we need to increase the size of the
// vector.
TEST(SizedArrayTest, NoUnnecessaryMalloc) {
- gflags::FlagSaver flag_saver;
- FLAGS_die_on_malloc = true;
+ absl::FlagSaver flag_saver;
+ absl::SetFlag(&FLAGS_die_on_malloc, true);
RegisterMallocHook();
InlinedVector<int, 5> a;
{
diff --git a/aos/containers/resizeable_buffer.h b/aos/containers/resizeable_buffer.h
index 1af888d..db4a102 100644
--- a/aos/containers/resizeable_buffer.h
+++ b/aos/containers/resizeable_buffer.h
@@ -8,7 +8,8 @@
#include <cstdlib>
#include <memory>
-#include "glog/logging.h"
+#include "absl/log/check.h"
+#include "absl/log/log.h"
namespace aos {
diff --git a/aos/containers/ring_buffer_test.cc b/aos/containers/ring_buffer_test.cc
index b7b0f17..ed388f3 100644
--- a/aos/containers/ring_buffer_test.cc
+++ b/aos/containers/ring_buffer_test.cc
@@ -3,7 +3,8 @@
#include <memory>
#include <ostream>
-#include "glog/logging.h"
+#include "absl/log/check.h"
+#include "absl/log/log.h"
#include "gtest/gtest.h"
namespace aos::testing {
diff --git a/aos/containers/sized_array_test.cc b/aos/containers/sized_array_test.cc
index 5fc4b38..8813370 100644
--- a/aos/containers/sized_array_test.cc
+++ b/aos/containers/sized_array_test.cc
@@ -174,7 +174,7 @@
// Verify that we didn't reallocate
EXPECT_EQ(pre_front, a.data());
- EXPECT_DEATH(a.emplace_back(5), "Aborted at");
+ EXPECT_DEATH(a.emplace_back(5), "SIGILL received at");
}
// Tests inserting at various positions in the array.