`env.NIX_CFLAGS_COMPILE` vs `CXXFLAGS`

Is there any chance you could elaborate on the workarounds?

I’m a junior member of darwin-maintainers, a self-taught hobbyist that knows a little bit of several relatively modern languages (well that and bash / python), but as I had no need (and rust already existed) I ended up skpping C-family languages completely. I’m roughly 50/50 darwin / linux, and I’d really like to help out more. I’ve loosely followed your work on the darwin stdenv revamp (with great admiration!), but most of it is far above my head.

I feel like I’m learning over time, but then I run into issues and end up endlessly spinning my wheels.

What workarounds did you need to use in order to pass -std=c++14 to codebases using both C and C++ with LLVM 16? Isn’t cc-wrapper being used under the covers – or are there situations that I need to specifically call / interact with it?

EDIT: Also, as we speak I’m trying to figure out how to compile GitHub - casadi/casadi: CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave., which seems to need "-std=c++17" or else I get error: no type named 'set_unexpected' in namespace 'std', but CXXFLAGS seemed to make no difference, and C barfed with env.NIX_CFLAGS_COMPILE = "-std=c++17";.