Skip to content

Commit

Permalink
Opt into unstable libcxx ABI and add a custom namespace.
Browse files Browse the repository at this point in the history
We use a statically linked libcxx and don't expose any of the internal symbols.
This theoretically allows us to namespace everything to avoid accidentally using
the wrong version libcxx. Also, not having to worry about ABI stability allows
libcxx to opt into optimized routines.

But, since libcxx uses CMake and we don't, the mechanism to generate the
__config_site file doesn't exist in GN. Instead, we check in a file that would
have been generated for us by CMake. The file we check in though is a default
with additional configuration. This version of the file makes it so that we opt
into the unstable ABI (and get optimizations) and also namespace everything for
Flutter so collisions are immediately flagged.
  • Loading branch information
chinmaygarde committed Dec 14, 2023
1 parent 45b95f2 commit dcc919a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/secondary/third_party/libcxx/config/__config_site
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifndef _LIBCPP_CONFIG_SITE
#define _LIBCPP_CONFIG_SITE

/* #undef _LIBCPP_ABI_VERSION */
/* #undef _LIBCPP_ABI_UNSTABLE */
#define _LIBCPP_ABI_VERSION 2
#define _LIBCPP_ABI_NAMESPACE _fl

/* #undef _LIBCPP_ABI_FORCE_ITANIUM */
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */
/* #undef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT */
Expand Down

0 comments on commit dcc919a

Please sign in to comment.