Author: rinrab
Date: Wed Sep 18 16:38:36 2024
New Revision: 1920771
URL: http://svn.apache.org/viewvc?rev=1920771&view=rev
Log:
build: Export some private functions from libraries, to link tools and
tests which uses them, against shared versions.
Now, the tests can be compiled in shared configuration on Windows with CMake,
which was impossible before due to not-exported functions from DLLs.
* build.conf
(libsvn_fs_fs, libsvn_fs_x, libsvn_fs_base,
libsvn_subr, libsvn_wc): Add private headers to msvc-export to get
them into .lib file.
(executables, tests, and tools, which were forced to be static): Allow them
to be linked against shared libraries.
* build/generator/extractor.py,
CMakeLists.txt
(def file generators): Ignore svn_fs_base__trail_debug, because it is
under ifdef.
Tested on:
- Windows, vcnet generator, shared libraries, including BDB.
- Windows, CMake, shared libraries, without BDB, because it is not
implemented in CMake build.
Modified:
subversion/trunk/CMakeLists.txt
subversion/trunk/build.conf
subversion/trunk/build/generator/extractor.py
Modified: subversion/trunk/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/subversion/trunk/CMakeLists.txt?rev=1920771&r1=1920770&r2=1920771&view=diff
==============================================================================
--- subversion/trunk/CMakeLists.txt (original)
+++ subversion/trunk/CMakeLists.txt Wed Sep 18 16:38:36 2024
@@ -407,6 +407,8 @@ function(target_exports target_name)
"svn_auth_kwallet_version"
"svn_auth_get_gpg_agent_simple_provider"
"svn_auth_gpg_agent_version"
+ # Unavailable in release mode
+ "svn_fs_base__trail_debug"
)
set(def_file_path ${CMAKE_BINARY_DIR}/${target_name}.def)
Modified: subversion/trunk/build.conf
URL:
http://svn.apache.org/viewvc/subversion/trunk/build.conf?rev=1920771&r1=1920770&r2=1920771&view=diff
==============================================================================
--- subversion/trunk/build.conf (original)
+++ subversion/trunk/build.conf Wed Sep 18 16:38:36 2024
@@ -247,7 +247,9 @@ type = lib
path = subversion/libsvn_client
libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr
install = lib
-msvc-export = svn_client.h private/svn_client_mtcc.h
private/svn_client_private.h private/svn_client_shelf.h
private/svn_client_shelf2.h
+msvc-export = svn_client.h private/svn_client_mtcc.h
private/svn_client_private.h
+ private/svn_client_shelf.h private/svn_client_shelf2.h
+ ../libsvn_client/mergeinfo.h ../libsvn_client/client.h
# Routines for binary diffing and tree-deltas
[libsvn_delta]
@@ -287,7 +289,12 @@ sources = *.c bdb/*.c util/*.c
install = bdb-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb libsvn_fs_util
add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
-msvc-export = ../libsvn_fs_base/fs_init.h
+msvc-export = ../libsvn_fs_base/fs_init.h ../libsvn_fs_base/fs.h
+ ../libsvn_fs_base/id.h ../libsvn_fs_base/key-gen.h
+ ../libsvn_fs_base/lock.h ../libsvn_fs_base/trail.h
+ ../libsvn_fs_base/util/fs_skels.h
../libsvn_fs_base/bdb/changes-table.h
+ ../libsvn_fs_base/bdb/txn-table.h
../libsvn_fs_base/bdb/nodes-table.h
+ ../libsvn_fs_base/bdb/strings-table.h
../libsvn_fs_base/bdb/reps-table.h
msvc-delayload = yes
[libsvn_fs_fs]
@@ -297,6 +304,11 @@ path = subversion/libsvn_fs_fs
install = fsmod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
msvc-export = private/svn_fs_fs_private.h ../libsvn_fs_fs/fs_init.h
+ ../libsvn_fs_fs/fs_fs.h ../libsvn_fs_fs/fs.h
+ ../libsvn_fs_fs/id.h ../libsvn_fs_fs/index.h
+ ../libsvn_fs_fs/low_level.h ../libsvn_fs_fs/pack.h
+ ../libsvn_fs_fs/rep-cache.h ../libsvn_fs_fs/rev_file.h
+ ../libsvn_fs_fs/util.h
msvc-delayload = yes
msvc-libs = ws2_32.lib
@@ -306,7 +318,9 @@ type = fs-module
path = subversion/libsvn_fs_x
install = fsmod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
-msvc-export = ../libsvn_fs_x/fs_init.h
+msvc-export = ../libsvn_fs_x/fs_init.h ../libsvn_fs_x/batch_fsync.h
+ ../libsvn_fs_x/fs_init.h ../libsvn_fs_x/fs_x.h
../libsvn_fs_x/fs.h
+ ../libsvn_fs_x/hotcopy.h ../libsvn_fs_x/reps.h
../libsvn_fs_x/string_table.h
msvc-delayload = yes
msvc-libs = ws2_32.lib
@@ -401,6 +415,7 @@ msvc-export =
private/svn_thread_cond.h private/svn_waitable_counter.h
private/svn_packed_data.h private/svn_object_pool.h private/svn_cert.h
private/svn_config_private.h private/svn_dirent_uri_private.h
+ ../libsvn_subr/crypto.h
# Working copy management lib
[libsvn_wc]
@@ -409,8 +424,11 @@ type = lib
path = subversion/libsvn_wc
libs = libsvn_delta libsvn_diff libsvn_subr aprutil apriconv apr
install = lib
-msvc-export = svn_wc.h private/svn_wc_private.h
-
+msvc-export = svn_wc.h private/svn_wc_private.h ../libsvn_wc/conflicts.h
+ ../libsvn_wc/lock.h ../libsvn_wc/token-map.h
+ ../libsvn_wc/tree_conflicts.h ../libsvn_wc/wc_db_private.h
+ ../libsvn_wc/wc_db.h ../libsvn_wc/wc-queries.h
+ ../libsvn_wc/wc.h ../libsvn_wc/workqueue.h
# Subversion plugin for Apache's mod_dav
[mod_dav_svn]
description = Subversion plug-in for the Apache DAV module
@@ -786,7 +804,6 @@ sources = fs-base-test.c
install = bdb-test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_base libsvn_delta
libsvn_fs_util libsvn_subr apriconv apr
-msvc-force-static = yes
[strings-reps-test]
description = Test strings/reps in libsvn_fs_base
@@ -796,7 +813,6 @@ sources = strings-reps-test.c
install = bdb-test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_base libsvn_delta
libsvn_subr apriconv apr
-msvc-force-static = yes
[changes-test]
description = Test changes in libsvn_fs_base
@@ -806,7 +822,6 @@ sources = changes-test.c
install = bdb-test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_base libsvn_delta
libsvn_subr apriconv apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# Tests for libsvn_fs_fs
@@ -818,7 +833,6 @@ sources = fs-fs-pack-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_subr apriconv apr
-msvc-force-static = yes
[fs-fs-fuzzy-test]
description = Use fuzzying to test FSFS corruption resilience
@@ -828,7 +842,6 @@ sources = fs-fs-fuzzy-test.c
install = sub-test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_repos libsvn_subr apriconv apr
-msvc-force-static = yes
[fs-fs-private-test]
description = Test FSFS private API
@@ -838,7 +851,6 @@ sources = fs-fs-private-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_repos libsvn_subr apriconv apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# Tests for libsvn_fs_x
@@ -850,7 +862,6 @@ sources = fs-x-pack-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_x libsvn_delta
libsvn_subr apriconv apr
-msvc-force-static = yes
[string-table-test]
description = Test fsfs string tables
@@ -859,7 +870,6 @@ path = subversion/tests/libsvn_fs_x
sources = string-table-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs_x libsvn_subr apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# Tests for libsvn_fs
@@ -871,7 +881,6 @@ path = subversion/tests/libsvn_fs
sources = locks-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_delta libsvn_subr apriconv apr
-msvc-force-static = yes
[fs-test]
description = Tests in libsvn_fs
@@ -952,7 +961,6 @@ path = subversion/tests/libsvn_subr
sources = checksum-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_subr apr zlib
-msvc-force-static = yes
[compat-test]
description = Test compatibility functions
@@ -977,7 +985,6 @@ path = subversion/tests/libsvn_subr
sources = crypto-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_subr aprutil apr
-msvc-force-static = yes
[dirent_uri-test]
description = Test dirent_uri library
@@ -1224,7 +1231,6 @@ path = subversion/tests/libsvn_client
sources = client-test.c
install = test
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs
libsvn_delta libsvn_subr apriconv apr
-msvc-force-static = yes
[mtcc-test]
description = Test Multi Command Context
@@ -1241,7 +1247,6 @@ path = subversion/tests/libsvn_client
sources = conflicts-test.c ../libsvn_wc/utils.c
install = test
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs
libsvn_delta libsvn_subr apriconv apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# Tests for libsvn_diff
@@ -1296,7 +1301,6 @@ path = subversion/tests/libsvn_wc
sources = conflict-data-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
[db-test]
description = Test the wc-ng database subsystem
@@ -1305,7 +1309,6 @@ path = subversion/tests/libsvn_wc
sources = db-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
[pristine-store-test]
description = Test the wc-ng pristine text storage subsystem
@@ -1314,7 +1317,6 @@ path = subversion/tests/libsvn_wc
sources = pristine-store-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
[entries-compat-test]
description = Test backwards compat for the entry interface
@@ -1323,7 +1325,6 @@ path = subversion/tests/libsvn_wc
sources = entries-compat.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
[op-depth-test]
description = Test layered tree changes
@@ -1332,7 +1333,6 @@ path = subversion/tests/libsvn_wc
sources = op-depth-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
[wc-queries-test]
description = Test Sqlite query evaluation
@@ -1349,7 +1349,6 @@ path = subversion/tests/libsvn_wc
sources = wc-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# Tests for the client's internal functions
@@ -1361,7 +1360,6 @@ path = subversion/tests/client
sources = filesize-test.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
# ----------------------------------------------------------------------------
# These are not unit tests at all, they are small programs that exercise
@@ -1393,7 +1391,6 @@ path = subversion/tests/cmdline
sources = entries-dump.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
testing = skip
[atomic-ra-revprop-change]
@@ -1418,7 +1415,6 @@ path = subversion/tests/libsvn_wc
sources = wc-lock-tester.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
testing = skip
[wc-incomplete-tester]
@@ -1427,7 +1423,6 @@ path = subversion/tests/libsvn_wc
sources = wc-incomplete-tester.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
-msvc-force-static = yes
testing = skip
[svn-wc-db-tester]
@@ -1436,7 +1431,6 @@ path = tools/dev/wc-ng
sources = svn-wc-db-tester.c
install = test
libs = libsvn_wc libsvn_subr apr
-msvc-force-static = yes
testing = skip
# ----------------------------------------------------------------------------
Modified: subversion/trunk/build/generator/extractor.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/build/generator/extractor.py?rev=1920771&r1=1920770&r2=1920771&view=diff
==============================================================================
--- subversion/trunk/build/generator/extractor.py (original)
+++ subversion/trunk/build/generator/extractor.py Wed Sep 18 16:38:36 2024
@@ -57,6 +57,9 @@ _filter_names = [
'svn_auth_kwallet_version',
'svn_auth_get_gpg_agent_simple_provider',
'svn_auth_gpg_agent_version',
+
+ # Unavailable in release mode
+ 'svn_fs_base__trail_debug',
]
if __name__ == '__main__':