Displaying 3 results from an estimated 3 matches for "enable_foo_bar".
2018 Sep 06
3
Environment variables
...will work. I was looking for something that caches calls to getenv so
>> checks could be put into tight(-ish) loops without too much performance
>> impact.
>
> Sorry for the snarky answer but we already have that:
>
> // outside of loop
> bool enableFooBar = getenv("ENABLE_FOO_BAR");
> while (...) {
> // it's not getting re-checked every loop iteration:
> enableFooBar;
> }
>
> Generally we don't really look at env vars today (I think for clang
> you can mostly affect some search paths with them) and IMO it is a
> good thing to for...
2018 Sep 06
2
Environment variables
Ok, thanks! I'm not dealing with UTF-8 so I don't think Process::GetEnv
will work. I was looking for something that caches calls to getenv so
checks could be put into tight(-ish) loops without too much performance
impact.
Would such a utility be of interest to the community?
-David
Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org> writes:
>
2018 Sep 06
2
Environment variables
...tenv so
> >>> checks could be put into tight(-ish) loops without too much performance
> >>> impact.
> >>
> >> Sorry for the snarky answer but we already have that:
> >>
> >> // outside of loop
> >> bool enableFooBar = getenv("ENABLE_FOO_BAR");
> >> while (...) {
> >> // it's not getting re-checked every loop iteration:
> >> enableFooBar;
> >> }
> >>
> >> Generally we don't really look at env vars today (I think for clang
> >> you can mostly affect some s...