[gtksourceview: 1/4] Meson: Stop using extract_all_objects()




commit 2c21444821cfee1482f9f26e082eeef1d92ec48c
Author: Xavier Claessens <xavier claessens collabora com>
Date:   Fri Apr 24 11:42:56 2020 -0400

    Meson: Stop using extract_all_objects()
    
    It was a work around for Meson bugs that got fixed in 0.52.0, see
    https://mesonbuild.com/Release-notes-for-0-52-0.html#improved-support-for-static-libraries.

 gtksourceview/meson.build | 21 ++-------------------
 meson.build               |  2 +-
 2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/gtksourceview/meson.build b/gtksourceview/meson.build
index e19c9dc0..a0ec23ad 100644
--- a/gtksourceview/meson.build
+++ b/gtksourceview/meson.build
@@ -215,11 +215,6 @@ install_headers(
 
 core_enums_h = core_enums.get(1)
 
-# Unfortunately, Visual Studio builds must build the core
-# sources twice, once for the GtkSourceView DLL, and once for
-# the tests (static core lib), so that we can ensure that
-# all the items from the core sources are properly linked into
-# the final GtkSourceView DLL and exported from it.
 core_lib = static_library(package_string + 'core', core_sources,
   include_directories: gtksourceview_include_dirs,
          dependencies: core_deps,
@@ -245,24 +240,12 @@ extra_public_sources = []
 subdir('completion-providers')
 
 
-# We can't use the static libs on Visual Studio builds
-# to form our DLL here directly, so we must use
-# extract_all_objects() to extract all the core and word
-# completion provider objects that we previously built
-# into static .lib's and link them into the main DLL
-# instead
-gtksource_objs = []
-foreach int_lib : gtksource_libs
-  gtksource_objs += int_lib.extract_all_objects()
-endforeach
-
 gtksource_lib = shared_library(package_string,
                 version: lib_version,
         darwin_versions: lib_osx_version,
     include_directories: gtksourceview_include_dirs,
-           dependencies: cc.get_id() == 'msvc' ? core_deps : gtksource_deps,
-                objects: cc.get_id() == 'msvc' ? gtksource_objs : [],
-             link_whole: cc.get_id() == 'msvc' ? [] : gtksource_libs,
+           dependencies: gtksource_deps,
+             link_whole: gtksource_libs,
                  c_args: core_c_args,
               link_args: release_link_args,
                 install: true,
diff --git a/meson.build b/meson.build
index 60aa529b..72308550 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 project('gtksourceview', 'c',
           version: '4.99.0',
           license: 'LGPL-2.1-or-later',
-    meson_version: '>= 0.50.0',
+    meson_version: '>= 0.52.0',
   default_options: [ 'c_std=gnu99',
                      'buildtype=debugoptimized',
                      'warning_level=2' ],


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]