[CDRIVER-1347] Define per symbol visibility rather then using separate export symbol files Created: 29/Jun/16  Updated: 15/Feb/17  Resolved: 07/Oct/16

Status: Closed
Project: C Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: 1.5.0

Type: Improvement Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CDRIVER-1466 clang exports private symbols Closed
related to CDRIVER-1034 libtool version info Closed
is related to CDRIVER-2054 Windows static build is broken in 1.5.0 Closed

 Description   

When we build with Autotools and gcc or clang, we specify which symbols to export with versions.ldscript, in both libbson and libmongoc. When we build with CMake and MS Visual Studio, we use libbson.def or libmongoc.def.

Sometimes (in CLion on Mac or Linux, for example) we'll build with CMake and gcc or clang. Use versions.ldscript in that configuration, too.



 Comments   
Comment by Githook User [ 08/Oct/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #399 from jrassi/CDRIVER-1347

CDRIVER-1347 Add missing BSON_API specifier to mongoc_log_set_handler
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/44765ab7caae03efc282eba9a982e2b2568c0b58

Comment by Githook User [ 08/Oct/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}

Message: Merge pull request #399 from jrassi/CDRIVER-1347

CDRIVER-1347 Add missing BSON_API specifier to mongoc_log_set_handler
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/44765ab7caae03efc282eba9a982e2b2568c0b58

Comment by Githook User [ 08/Oct/16 ]

Author:

{u'username': u'jrassi', u'name': u'J. Rassi', u'email': u'rassi@10gen.com'}

Message: CDRIVER-1347 Add missing BSON_API specifier to mongoc_log_set_handler
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/ce64a5b2d5299f221271e5b04e017dca3c9ce473

Comment by Githook User [ 07/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1347 Explicitly export symbols
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/91f8ffe40044201fae003745bb976195e764202e

Comment by Githook User [ 07/Oct/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-1347 Remove static symbol files
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/09da97ac93ee275ebd3f6f2c68f15cfb15dcdad8

Comment by Hannes Magnusson [ 05/Oct/16 ]

libbson:
https://github.com/mongodb/libbson/commit/52eeca1aed8c2fd14c09a5456b5a4c5072eeeb67

Comment by Hannes Magnusson [ 03/Oct/16 ]

libbson:
https://github.com/mongodb/libbson/commit/ca2f3ad7548a25580312814ab54bf3e93a9b6a30
https://github.com/mongodb/libbson/commit/057f5d2ae9592935773719b43b00659b0fc58026
https://github.com/mongodb/libbson/commit/f5cb78f8ecc535e1087c2a7015eafe5216924ae7
https://github.com/mongodb/libbson/commit/dee61b4cba7c8760e1aee1878acfe66b18af6f5c

Comment by A. Jesse Jiryu Davis [ 30/Sep/16 ]

I like it, SGTM.

Comment by Hannes Magnusson [ 29/Sep/16 ]

I think we should remove these files, the are consistent source of unnecessary problems and maintenance.
I think we should instead take the one time hit of prefixing the functions we'd like to export with BSON_API. __attribute__ ((visibility("default"))) is well supported today.

Then we don't have to be juggling all these extra files, keeping them in sync, and making copies of them per build mutation (ssl, experimental, ..)

Generated at Wed Feb 07 21:12:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.