dawnbeen / c_formatter_42

C language formatter for 42 norminette
GNU General Public License v3.0
176 stars 17 forks source link

Add more robust clang-format executable #19

Open cacharle opened 2 years ago

cacharle commented 2 years ago

Right now, we're using a clang-format executable for both Linux and Mac to have the same version of clang-format no matter what version of it is installed on the user's system.

But this is causing issues with dynamic linking since different version can link to different .so.

https://github.com/dawnbeen/c_formatter_42/issues/17#issuecomment-1008298872

We should find a way to either build a standalone clang-format executable or include the needed shared libaries with the c_formatter_42 package.

cacharle commented 2 years ago

http://www.linuxmisc.com/9-unix-programmer/8793219ab1f00856.htm https://stackoverflow.com/questions/19425993/how-to-convert-dynamic-executable-to-static-executable

Have to recompile apparently.

cacharle commented 2 years ago

Dynamic linking stuff can be avoided if we have an executable by OS and architecture (only supports x86_64 right now