diff options
author | Ryan Egesdahl <ryan.egesdahl@mongodb.com> | 2020-12-07 09:33:33 -0800 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-09 16:16:17 +0000 |
commit | b0120ee8b2a50a62f0b92a259f32d82f4c1aea22 (patch) | |
tree | e854f47000b6ec2d01de250677d8fc946ade8889 /src/shim_cxx.cpp | |
parent | 51e3e36ac48cac80c920e5e418013fdb0a6747f2 (diff) | |
download | mongo-b0120ee8b2a50a62f0b92a259f32d82f4c1aea22.tar.gz |
SERVER-48291 Ensure runtime is dynamically linked in dynamic builds
Prior to this point, a dynamic build might have resulted in some runtime
libraries being statically linked into shared objects and executables in
cases where "shared" runtime libraries were actually linker scripts that
linked static versions. This was the case with the MongoDB toolchain and
some distro toolchains, including those installed as updated compiler
versions in RHEL.
The effect of having runtime libraries statically linked was that
symbols from those libraries would end up scattered over the compiled
objects, increasing object sizes and slowing down server startup. Now,
whenever a dynamic build is selected, the user can choose whether to
create "shim" runtime libraries that wrap the static ones.
The default behavior remains as it was before, and dynamic runtime must
be enabled in order to use it.
Diffstat (limited to 'src/shim_cxx.cpp')
-rw-r--r-- | src/shim_cxx.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shim_cxx.cpp b/src/shim_cxx.cpp new file mode 100644 index 00000000000..d18e22432d7 --- /dev/null +++ b/src/shim_cxx.cpp @@ -0,0 +1,3 @@ +// This file intentionally blank. shim_cxx.cpp rolls together the C++ +// runtime libraries to provide a single source of those symbols to other +// compiled objects in a dynamically linked build. |