[GTK][WPE] Remove gflags from libwebrtc build
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2018 08:19:05 +0000 (08:19 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2018 08:19:05 +0000 (08:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187078

Reviewed by Alejandro G. Castro.

gflags is used only in libyuv unit tests. So the Apple ports do not build & link it.
GTK and WPE can do the same thing: not building gflags. By doing so, we can achieve
the following results.

1. Remove static initializers defined for gflags.
2. Reduce binary size.

* CMakeLists.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233249 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/libwebrtc/CMakeLists.txt
Source/ThirdParty/libwebrtc/ChangeLog

index 11037cb..c4a662f 100644 (file)
@@ -1373,7 +1373,6 @@ set(webrtc_SOURCES
     Source/webrtc/voice_engine/channel_proxy.cc
     Source/webrtc/voice_engine/transport_feedback_packet_loss_tracker.cc
     Source/webrtc/voice_engine/utility.cc
-    $<TARGET_OBJECTS:gflags>
     $<TARGET_OBJECTS:libsrtp>
 )
 
@@ -1462,30 +1461,6 @@ target_link_libraries(webrtc ${VPX_LIBRARY})
 
 target_link_libraries(webrtc ${EVENT_LIBRARY})
 
-# gflags package compilation
-set(gflags_SOURCES
-    Source/third_party/gflags/src/src/gflags.cc
-    Source/third_party/gflags/src/src/gflags_completions.cc
-    Source/third_party/gflags/src/src/gflags_reporting.cc
-)
-
-add_library(gflags OBJECT ${gflags_SOURCES})
-
-target_compile_options(gflags PRIVATE
-    "-w"
-)
-
-target_compile_definitions(gflags PRIVATE
-    GFLAGS_DLL_DECL=
-    GFLAGS_DLL_DECLARE_FLAG=
-    GFLAGS_DLL_DEFINE_FLAG=
-)
-
-target_include_directories(gflags PRIVATE
-    Source/third_party/gflags/gen/posix/include/gflags/
-    Source/third_party/gflags/gen/posix/include/private/
-)
-
 # libsrtp package compilation
 set(libsrtp_SOURCES
     Source/third_party/libsrtp/crypto/cipher/aes_gcm_ossl.c
index b920f43..679e4a5 100644 (file)
@@ -1,3 +1,19 @@
+2018-06-26  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [GTK][WPE] Remove gflags from libwebrtc build
+        https://bugs.webkit.org/show_bug.cgi?id=187078
+
+        Reviewed by Alejandro G. Castro.
+
+        gflags is used only in libyuv unit tests. So the Apple ports do not build & link it.
+        GTK and WPE can do the same thing: not building gflags. By doing so, we can achieve
+        the following results.
+
+        1. Remove static initializers defined for gflags.
+        2. Reduce binary size.
+
+        * CMakeLists.txt:
+
 2018-06-25  Keith Rollin  <krollin@apple.com>
 
         Adjust webrtc library for LTO