Commit 18ac608
Export Mutex::Dtor from shared libraries in NDEBUG mode
When Abseil is built as a shared library (`ABSL_BUILD_DLL`) with `NDEBUG` defined, `Mutex::Dtor()` is currently fully inlined and no symbol is emitted.
Downstream clients building against this shared library without `NDEBUG` defined (e.g., a debug build of an application linking against a system-provided release Abseil DLL) will expect a `Mutex::Dtor()` symbol to exist, ensuring ABI compatibility. Currently, this leads to undefined reference linker errors.
This patch aligns `Mutex::Dtor()` with the existing logic for `Mutex::~Mutex()`: it disables inlining in the header when `ABSL_BUILD_DLL` is active and ensures an empty definition is provided in the source file for these builds.
PiperOrigin-RevId: 828160210
Change-Id: I5ed1fd6757d631e80d6f084d20bfe8e25f6ef2531 parent 6d94b2c commit 18ac608
2 files changed
+9
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
745 | 745 | | |
746 | 746 | | |
747 | 747 | | |
748 | | - | |
| 748 | + | |
| 749 | + | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
1142 | | - | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1148 | 1149 | | |
1149 | 1150 | | |
1150 | 1151 | | |
| |||
0 commit comments