Top Level Namespace
Defined Under Namespace
Modules: SmarterCSV
Instance Method Summary collapse
-
#compiler_accepts?(flag) ⇒ Boolean
Probe whether the compiler accepts a flag by compiling a trivial program with it.
Instance Method Details
#compiler_accepts?(flag) ⇒ Boolean
Probe whether the compiler accepts a flag by compiling a trivial program with it. Lets us skip flags the toolchain rejects (e.g. -march=native on Clang/ARM, or GCC-only flags on MSVC) instead of breaking the build. Replaces the old RUBY_PLATFORM string guesses: ask the actual compiler, don't infer from the OS.
17 18 19 |
# File 'ext/smarter_csv/extconf.rb', line 17 def compiler_accepts?(flag) try_compile("int main(void){return 0;}", flag) end |