Make C++ flags available in Rust.
In order to do this, we automagically grab all of C++ gflags and
add them into the Rust Clap command. We then pass through the flags
back to C++ to set them.
This requires different versions of clap to make both our implementation
and autocxx happy.
Change-Id: I36a9584de2ade55390f7109889996bad6e2cd071
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/init.cc b/aos/init.cc
index 3ca7314..579ad33 100644
--- a/aos/init.cc
+++ b/aos/init.cc
@@ -45,25 +45,6 @@
initialized = true;
}
-void InitFromRust(const char *argv0) {
- CHECK(!IsInitialized()) << "Only initialize once.";
-
- FLAGS_logtostderr = true;
-
- google::InitGoogleLogging(argv0);
-
- // TODO(Brian): Provide a way for Rust to configure C++ flags.
- char fake_argv0_val[] = "rust";
- char *fake_argv0 = fake_argv0_val;
- char **fake_argv = &fake_argv0;
- int fake_argc = 1;
- gflags::ParseCommandLineFlags(&fake_argc, &fake_argv, true);
-
- // TODO(Brian): Where should Rust binaries be configured to write coredumps?
-
- // TODO(Brian): Figure out what to do with allocator hooks for C++ and Rust.
-
- initialized = true;
-}
+void MarkInitialized() { initialized = true; }
} // namespace aos