Commit 10f3e611 by Derek Mauro Committed by Copybara-Service

Add a note about how to link absl::log_flags under CMake to workaround

the lack of a feature equivalent to Bazel's alwayslink=True

PiperOrigin-RevId: 598855446
Change-Id: I0bb3bc40005908106eb7a7252572e3af153a7f5c
parent b2dd3a5b
...@@ -80,7 +80,7 @@ endif() ...@@ -80,7 +80,7 @@ endif()
# absl::fantastic_lib # absl::fantastic_lib
# ) # )
# #
# TODO: Implement "ALWAYSLINK" # TODO(b/320467376): Implement "ALWAYSLINK".
function(absl_cc_library) function(absl_cc_library)
cmake_parse_arguments(ABSL_CC_LIB cmake_parse_arguments(ABSL_CC_LIB
"DISABLE_INSTALL;PUBLIC;TESTONLY" "DISABLE_INSTALL;PUBLIC;TESTONLY"
......
...@@ -461,6 +461,11 @@ absl_cc_library( ...@@ -461,6 +461,11 @@ absl_cc_library(
PUBLIC PUBLIC
) )
# Warning: Many linkers will strip the contents of this library because its
# symbols are only used in a global constructor. A workaround is for clients
# to link this using $<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags> instead of
# the plain absl::log_flags.
# TODO(b/320467376): Implement the equivalent of Bazel's alwayslink=True.
absl_cc_library( absl_cc_library(
NAME NAME
log_flags log_flags
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment