Skip to content

Commit

Permalink
chore: Upgrade absl and protobuf (#1337)
Browse files Browse the repository at this point in the history
protobuf depends on absl, so both needed an update.

Updating absl fixes issues on Alpine 3.19 (see PR #1327), and also
removes the need for hacks around vlog flags.
  • Loading branch information
joeyparrish authored Feb 10, 2024
1 parent 9b38482 commit 15b2754
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 119 deletions.
4 changes: 0 additions & 4 deletions packager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ add_executable(packager
app/stream_descriptor.h
app/validate_flag.cc
app/validate_flag.h
app/vlog_flags.cc
app/vlog_flags.h
app/widevine_encryption_flags.cc
app/widevine_encryption_flags.h
)
Expand All @@ -190,8 +188,6 @@ target_link_libraries(packager
add_executable(mpd_generator
app/mpd_generator.cc
app/mpd_generator_flags.h
app/vlog_flags.cc
app/vlog_flags.h
)
target_link_libraries(mpd_generator
absl::flags
Expand Down
3 changes: 0 additions & 3 deletions packager/app/mpd_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <absl/strings/str_split.h>

#include <packager/app/mpd_generator_flags.h>
#include <packager/app/vlog_flags.h>
#include <packager/mpd/util/mpd_writer.h>
#include <packager/tools/license_notice.h>
#include <packager/version/version.h>
Expand Down Expand Up @@ -124,8 +123,6 @@ int MpdMain(int argc, char** argv) {
return status;
}

handle_vlog_flags();

absl::InitializeLog();

if (!absl::GetFlag(FLAGS_test_packager_version).empty())
Expand Down
3 changes: 0 additions & 3 deletions packager/app/packager_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <packager/app/raw_key_encryption_flags.h>
#include <packager/app/retired_flags.h>
#include <packager/app/stream_descriptor.h>
#include <packager/app/vlog_flags.h>
#include <packager/app/widevine_encryption_flags.h>
#include <packager/file.h>
#include <packager/kv_pairs/kv_pairs.h>
Expand Down Expand Up @@ -564,8 +563,6 @@ int PackagerMain(int argc, char** argv) {
absl::SetMinLogLevel(absl::LogSeverityAtLeast::kWarning);
}

handle_vlog_flags();

absl::InitializeLog();

if (!ValidateWidevineCryptoFlags() || !ValidateRawKeyCryptoFlags() ||
Expand Down
72 changes: 0 additions & 72 deletions packager/app/vlog_flags.cc

This file was deleted.

17 changes: 0 additions & 17 deletions packager/app/vlog_flags.h

This file was deleted.

16 changes: 0 additions & 16 deletions packager/macros/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,4 @@
/// You can use the insertion operator to add specific logs to this.
#define NOTIMPLEMENTED() LOG(ERROR) << "NOTIMPLEMENTED: "

#define VLOG(verboselevel) \
LOG(LEVEL(static_cast<absl::LogSeverity>(-verboselevel)))

#define VLOG_IS_ON(verboselevel) \
(static_cast<int>(absl::MinLogLevel()) <= -verboselevel)

#ifndef NDEBUG
#define DVLOG(verboselevel) VLOG(verboselevel)
#else
// We need this expression to work with << after it, so this is a simple way to
// turn DVLOG into a no-op in release builds.
#define DVLOG(verboselevel) \
if (false) \
VLOG(verboselevel)
#endif

#endif // PACKAGER_MACROS_LOGGING_H_
3 changes: 3 additions & 0 deletions packager/third_party/abseil-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ set(ABSL_PROPAGATE_CXX_STD ON)
# for one in the system.
set(ABSL_USE_EXTERNAL_GOOGLETEST ON)

# Disable internal debugging features.
add_definitions(-DNDEBUG)

# With these set in scope of this folder, load the library's own CMakeLists.txt.
add_subdirectory(source)
2 changes: 1 addition & 1 deletion packager/third_party/abseil-cpp/source
Submodule source updated 579 files
3 changes: 1 addition & 2 deletions packager/third_party/protobuf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ set(ABSL_ROOT_DIR get_filename_component(ABSOLUTE_PATH ../abseil-cpp/source ABSO
# Make sure protoc links against the same MSVC runtime as internal libs.
set(protobuf_MSVC_STATIC_RUNTIME OFF)

# Disable internal debugging features, which end up triggering further compiler
# errors.
# Disable internal debugging features.
add_definitions(-DNDEBUG)

# With these set in scope of this folder, load the library's own CMakeLists.txt.
Expand Down
2 changes: 1 addition & 1 deletion packager/third_party/protobuf/source
Submodule source updated 2213 files

0 comments on commit 15b2754

Please sign in to comment.