@@ -81,37 +81,6 @@ pybind11_add_module(
8181target_link_libraries (_duckdb PRIVATE _duckdb_dependencies )
8282duckdb_link_extensions (_duckdb )
8383
84- # ────────────────────────────────────────────
85- # Controlling symbol export
86- #
87- # We want to export exactly two symbols: - PyInit__duckdb: this allows CPython
88- # to load the module - duckdb_adbc_init: the DuckDB ADBC driver
89- #
90- # The export of symbols on OSX and Linux is controlled by: - Visibility
91- # annotations in the code (for this lib we use the PYBIND11_EXPORT macro) -
92- # Telling the linker which symbols we want exported, which we do below
93- #
94- # For Windows, we rely on just the visbility annotations.
95- # ────────────────────────────────────────────
96- set_target_properties (
97- _duckdb
98- PROPERTIES CXX_VISIBILITY_PRESET hidden
99- C_VISIBILITY_PRESET hidden
100- VISIBILITY_INLINES_HIDDEN ON )
101-
102- if (APPLE )
103- target_link_options (
104- _duckdb PRIVATE "LINKER:-exported_symbol,_duckdb_adbc_init"
105- "LINKER:-exported_symbol,_PyInit__duckdb" )
106- elseif (UNIX AND NOT APPLE )
107- target_link_options (
108- _duckdb PRIVATE "LINKER:--export-dynamic-symbol=duckdb_adbc_init"
109- "LINKER:--export-dynamic-symbol=PyInit__duckdb" )
110- elseif (WIN32 )
111- target_link_options (_duckdb PRIVATE "/EXPORT:duckdb_adbc_init"
112- "/EXPORT:PyInit__duckdb" )
113- endif ()
114-
11584# ────────────────────────────────────────────
11685# Put the object file in the correct place
11786# ────────────────────────────────────────────
0 commit comments