Skip to content

Experiment: Add linker version scripts to the build for better ABI control #3608

Draft
Vika-F wants to merge 30 commits into
uxlfoundation:mainfrom
Vika-F:dev/version_scripts
Draft

Experiment: Add linker version scripts to the build for better ABI control #3608
Vika-F wants to merge 30 commits into
uxlfoundation:mainfrom
Vika-F:dev/version_scripts

Conversation

@Vika-F
Copy link
Copy Markdown
Contributor

@Vika-F Vika-F commented Apr 13, 2026

Description

Work in progress!

The scripts are going to have more details; also need to cover Bazel and Windows builds.

Inspired by oneTBB's approach regarding ABI control:
https://github.com/uxlfoundation/oneTBB/tree/master/src/tbb/def


Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.
  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.
  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.

@david-cortes-intel
Copy link
Copy Markdown
Contributor

@Vika-F Aren't these .def files only recognized by msvc by default? And shouldn't they also have LIBRARY and EXPORTS?

@Vika-F
Copy link
Copy Markdown
Contributor Author

Vika-F commented Apr 16, 2026

Aren't these .def files only recognized by msvc by default?

You are partially right. I think the extension is misleading, .map is a more common variant for Linux, and .def - for Windows.

For now I am implementing Linux version using ld version script files, the syntax is different for those:
https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html

I will need to implement similar functionality for MSVC, with LIBRARY and EXPORTS sections, yes. As far as I understand those files are not cross-platform :(

@david-cortes-intel
Copy link
Copy Markdown
Contributor

Aren't these .def files only recognized by msvc by default?

You are partially right. I think the extension is misleading, .map is a more common variant for Linux, and .def - for Windows.

For now I am implementing Linux version using ld version script files, the syntax is different for those: https://www.gnu.org/software/gnulib/manual/html_node/LD-Version-Scripts.html

I will need to implement similar functionality for MSVC, with LIBRARY and EXPORTS sections, yes. As far as I understand those files are not cross-platform :(

Got it. Then let's better name them .map to avoid confusions.

@Vika-F
Copy link
Copy Markdown
Contributor Author

Vika-F commented May 12, 2026

/intelci: run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants