Skip to content

Makefile: make MLX_SO overridable#111

Open
GenericJam wants to merge 1 commit into
elixir-nx:mainfrom
GenericJam:makefile-mlx-so-overridable
Open

Makefile: make MLX_SO overridable#111
GenericJam wants to merge 1 commit into
elixir-nx:mainfrom
GenericJam:makefile-mlx-so-overridable

Conversation

@GenericJam
Copy link
Copy Markdown

@GenericJam GenericJam commented May 15, 2026

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
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.

1 participant