honour flags in the environment; add flags for clang