<div dir="ltr">This is a proposal to add a configuration option to disable _LIBCPP_INLINE_VISIBILITY, which causes large stack frames in non-optimized builds because it uses the always_inline attribute to force significant amounts of inlining of libc++ code.<br><br>The new configuration option could be called _LIBCPP_DISABLE_INLINE_VISIBILITY.<br><br>Note that _LIBCPP_INLINE_VISIBILITY and _LIBCPP_ALWAYS_INLINE have identical definitions. One could be renamed to the other or both could be renamed to _LIBCPP_HIDE_FROM_ABI as part of this work.<br><br>Alternatives considered and rejected:<br><br>1. Remove __attribute__((__always_inline__)) from all include/__config macros.<br>2. Add _LIBCPP_DISABLE_ALWAYS_INLINE to control whether or not __always_inline__ is included in any __config macro.<br>3. Use the existing _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS to control both __visibility__ and __always_inline__.<br>4. Use the existing _LIBCPP_ABI_UNSTABLE to control _LIBCPP_INLINE_VISIBILITY.<br><br>Further background reading:<br><br>The two macros were made identical in the following commit, an effort to reduce the number of exported symbols (Dec 17, 2010):<br><br><a href="https://github.com/llvm-mirror/libcxx/commit/2d72b1e393e35d61917d6d0ce069482ab11e96d1">https://github.com/llvm-mirror/libcxx/commit/2d72b1e393e35d61917d6d0ce069482ab11e96d1</a><br><br>Brief documentation about these macros was added later (Sep 15, 2016):<br><br><a href="https://github.com/llvm-mirror/libcxx/commit/833d644ed1c04346d665193d1b3eac5e3ae68193">https://github.com/llvm-mirror/libcxx/commit/833d644ed1c04346d665193d1b3eac5e3ae68193</a><br><br>The macros were discussed here before:<br><br><a href="http://lists.llvm.org/pipermail/cfe-dev/2015-December/046436.html">http://lists.llvm.org/pipermail/cfe-dev/2015-December/046436.html</a><br></div>