1

Given a meson-based project where meson.build contains the following line:

cc = meson.get_compiler('c')

How does meson.get_compiler('c') pick a compiler on a system with multiple C compilers? At the time of writing this question, the reference manual does not provide much detail, only...

Returns a compiler object describing a compiler.

Please note I am not trying to force meson to use a specific compiler. Rather, I am trying to understand how this line in meson.build, as it is currently written, will function.

duggulous
  • 2,427
  • 3
  • 23
  • 40

1 Answers1

1

On Windows it tries icl, cl, cc, gcc, clang, clang-cl, pgcc; on Linux it tries cc, gcc, clang, nvc, pgc, icc. That's after it looks for the value of $CC and whatever is in your cross or native file. See the code here.

dcbaker
  • 643
  • 2
  • 7