fables-tales / rubyfmt

Ruby Autoformatter!
MIT License
1.08k stars 50 forks source link

extract ruby arch from `rbconfig.rb` #434

Closed froydnj closed 1 year ago

froydnj commented 1 year ago

We currently pass a bunch of include paths into the compiler when compiling the C code that's part of rubyfmt. This is not that pretty, and requires adding extra code for every architecture/OS combination that we build rubyfmt on.

A better way is to ask Ruby what its "architecture" is, and use that information to construct the include paths that we need. This is slightly fragile, but is at least easy to make it fail loudly and early so people can figure out what's wrong if the formatting of this file changes.

cc @ilyailya

froydnj commented 1 year ago

r? @reese