---
title: "Introducing Abseil Options"
layout: blog
sidenav: side-nav-blog.html
published: true
permalink: blog/201901115-options
type: markdown
category: blog
excerpt_separator: <!--break-->
---
 
By [Greg Falcon](mailto:gfalcon@google.com), Abseil Engineer
 
Abseil now provides an [options
file](https://github.com/abseil/abseil-cpp/blob/master/absl/base/options.h),
providing a limited means of configuring Abseil's features. In the initial
release of this options mechanism, we have added the ability to override
Abseil's automatic type detection and force (for example) `absl::string_view` to
either always alias to `std::string_view`, or always remain using our Abseil
implementation.

<!--break-->
 
The key word above is "limited": these options are dangerous if used
incorrectly, and can only be safely used in some contexts. This blog post
explains this feature and how to correctly use it.
 
## Motivation

While we discourage relying on compiled representations of libraries,
we recognize this isn't always possible for providers of binaries or compiled
libraries (such as package managers). This options mechanism is provided to
allow those providers to ensure that copies of Abseil use the same
implementation. For information on how to use this options mechanism to
provide such ABI stability, consult our
[Options guide](/docs/cpp/guides/options).

## Caveats

Two copies of Abseil configured with different options are incompatible, in
exactly the same way that two different source snapshots of Abseil are
incompatible. Abseil options must be set consistently across an entire program.
They cannot be changed on a per-library basis.

These options are dangerous if used incorrectly, and can only be safely used in
some contexts.

Because of the increased testing burden they impose, we plan to keep the set of
options we support small. If you change any options, we recommend that you run
the Abseil unit tests, to ensure your settings work with your toolchain. The
default options we ship with reflect how we use Abseil internally. This is the
configuration that is "battle tested" in Google’s C++ codebase.
Add initial options blog post
Add initial options blog post
