Do not leak macro definitions in stack-trace.h

Since we use glog, we need to still rely on gFlags for as long as Abseil
logging is not yet released. To do this, we have the util/flag.h header in
SAPI, faking the newer style API of Abseil's flags library.
The rationale behind this is that glog includes/builds with gflags for
command line flag parsing and having more than one flag parsing library
active at the same time is asking for trouble.

PiperOrigin-RevId: 256982667
Change-Id: I9c5406cb9ef4458daebfec0b0713f9bddbf5c3ad
This commit is contained in:
Christian Blichmann 2019-07-08 08:24:53 -07:00 committed by Copybara-Service
parent 2301e05097
commit c7f7666d9d
2 changed files with 2 additions and 4 deletions

View File

@ -24,15 +24,11 @@
#include <memory>
#include <string>
#include "sandboxed_api/util/flag.h"
#include "sandboxed_api/sandbox2/mounts.h"
#include "sandboxed_api/sandbox2/policy.h"
#include "sandboxed_api/sandbox2/regs.h"
#include "sandboxed_api/sandbox2/unwind/unwind.pb.h"
// Exposed for testing only
ABSL_DECLARE_FLAG(bool, sandbox_libunwind_crash_handler);
namespace sandbox2 {
// Maximum depth of analyzed call stack.

View File

@ -36,6 +36,8 @@
#include "sandboxed_api/sandbox2/util/temp_file.h"
#include "sandboxed_api/util/status_matchers.h"
ABSL_DECLARE_FLAG(bool, sandbox_libunwind_crash_handler);
using ::testing::Eq;
using ::testing::HasSubstr;
using ::testing::Not;