Skip to content

Commit

Permalink
build: Fix absl log flags being stripped
Browse files Browse the repository at this point in the history
According to a comment in
packager/third_party/abseil-cpp/source/absl/log/CMakeLists.txt, many
linkers will strip the contents of absl::log_flags because its symbols
symbols are only used in a global constructor, and that for now,
clients should link using
$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>.

Closes shaka-project#1325
  • Loading branch information
joeyparrish committed Feb 14, 2024
1 parent df04d0e commit fcffda6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ target_link_libraries(packager
absl::flags
absl::flags_parse
absl::log
absl::log_flags
# See https://github.com/abseil/abseil-cpp/blob/c14dfbf9/absl/log/CMakeLists.txt#L464-L467
$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>
absl::strings
hex_bytes_flags
libpackager
Expand All @@ -193,7 +194,8 @@ target_link_libraries(mpd_generator
absl::flags
absl::flags_parse
absl::log
absl::log_flags
# See https://github.com/abseil/abseil-cpp/blob/c14dfbf9/absl/log/CMakeLists.txt#L464-L467
$<LINK_LIBRARY:WHOLE_ARCHIVE,absl::log_flags>
absl::strings
license_notice
mpd_builder
Expand Down

0 comments on commit fcffda6

Please sign in to comment.