Skip to content

Conversation

@zcbenz
Copy link
Collaborator

@zcbenz zcbenz commented Jan 22, 2026

Close #3031.
Close #3020.

This PR links MLX with the prebuilt dynamic library of OpenBLAS on Windows instead of building it from source code, which can save a lot of build time. (Note that we can not do static-linking, check the comments for more.)

Which then requires changing the locations where libraries and executables are generated, as Windows requires the DLL and EXE files be in the same directory (as there is no equivalent of RPATH on Windows):

  • For building: the DLL and EXE would be written in the root build dir (previously EXE are put in sub-dirs like tests/test.exe)
  • For installing: the DLL would be put in the same dir with extension file (previously they are put in the bin sub-dir)

Note that the locations are only changed for Windows, and only when MLX is the top project, for projects that include MLX as a third party library there is nothing changed.

/cc @dhiltgen

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Built DLLs in the same directory with EXEs on Windows Link with prebuilt binaries of OpenBLAS on Windows

2 participants