Hide symbols by default for mac/linux#3057
Conversation
ca88424 to
5bc5fef
Compare
|
This unfortunately breaks my extension where I was using a bunch of non-public helpers. These were not officially public to begin with but it was very convenient that I could still access them. Whats the best path forward for my use case? Seems my two options now are either maintain a fork of mlx or copy a lot of code into my extension. In my ideal world everything would be accessible and all header files would be shipped in the .whl but some would be under an |
|
@bear24rw I think for now we can just export those functions with |
|
@zcbenz I think it might be a bit of game of whack a mole since those functions I listed are just what I happened to be using today but my extension is still in development. I've decided to just go down the fork mlx route with the hope that one day it would be upstreamed anyway :) |
Change the default symbol visibility to hidden for mac/linux, and require using
MLX_APImacro for exporting symbols. This makes all platforms use the same symbol visibility, which can reduce the cases that code works for mac/linux but fails for windows.Hiding symbols by default also has some benefits:
libmlx.soshrinks from 81M to 79M.