aganea added inline comments.
================ Comment at: clang/tools/driver/driver.cpp:267 + + StringRef SpawnCC1Str = ::getenv("CLANG_SPAWN_CC1"); + if (!SpawnCC1Str.empty()) { ---------------- hans wrote: > aganea wrote: > > hans wrote: > > > Maybe just do the "!!" thing like for the environment variables above? > > > It's not pretty, but at least that would be consistent, and it avoids the > > > problem of deciding what values mean "on" and what mean "off". > > Not if we want to negate the `CLANG_SPAWN_CC1` compile-time flag > > initialized just above. `!!::getenv` will only say the option is there, it > > won't say what we should do. My rationale was, if the env variable is > > there, its value overrides the compile-time flag. Unless we want something > > along the lines of `CLANG_ENABLE_SPAWN_CC1` / `CLANG_DISABLE_SPAWN_CC1`? > Ah, I didn't think about that. > > This feels a bit fragile though, for example if the user sets it to "yes" > instead of "on", it won't be obvious that it has the opposite effect. What do > you think about only supporting 1 and 0, and printing a helpful error for > other values? > > Also, the comparisons could be done with equals(_lower) instead of the > compare methods. As requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69825/new/ https://reviews.llvm.org/D69825 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits