Skip to content

Makefile: make MLX_SO overridable#111

Merged
polvalente merged 2 commits into
elixir-nx:mainfrom
GenericJam:makefile-mlx-so-overridable
May 23, 2026
Merged

Makefile: make MLX_SO overridable#111
polvalente merged 2 commits into
elixir-nx:mainfrom
GenericJam:makefile-mlx-so-overridable

Conversation

@GenericJam

@GenericJam GenericJam commented May 15, 2026

Copy link
Copy Markdown
Contributor

Per suggestion in Slack: change MLX_SO = ... to MLX_SO ?= ... on emlx/Makefile:12 so downstream callers can point at a different MLX artifact (e.g. libmlx.a for iOS static linking, where the OS won't dlopen from app data) without editing the Makefile:

MLX_SO=$(MLX_LIB_DIR)/libmlx.a make

Tiny, mechanical change. The current Linux/macOS dynamic-link defaults are unchanged.

Context: we (mob) are building EMLX against a static libmlx.a for iOS device + simulator targets, alongside an MLX iOS+Metal patch we'd like to upstream into cocoa-xu/mlx-build. This ?= change is the minimal unlock that lets EMLX itself participate in that pipeline without a vendored fork.

Human edit: this PR is made by Claude at my direction. Not offended if AI PRs are rejected.

Lets downstream callers point at a different MLX artifact (e.g.
libmlx.a for iOS static linking) without editing the Makefile:

    MLX_SO=$(MLX_LIB_DIR)/libmlx.a make
@polvalente polvalente merged commit 14a5259 into elixir-nx:main May 23, 2026
6 checks passed
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.

2 participants