[llvm-dev] unusual use of getenv

Chris Lattner via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 3 16:25:37 PST 2020


This seems like a good approach.

-Chris

> On Nov 2, 2020, at 1:32 PM, James Y Knight via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Replacing the getenv with this ought to be sufficient:
>     volatile int opaque_flag = 0;
>     if (!opaque_flag) return;
> 
> On Mon, Nov 2, 2020 at 4:25 PM Luke Drummond via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> On Mon Nov 2, 2020 at 7:56 PM GMT, Johannes Doerfert wrote:
> 
> > Last time I removed the getenv calls, as an Aprils fool joke btw [1],
> > I ended up with a compiler that was unable to do a stage 2 build, IIRC.
> >
> > [1] https://lists.llvm.org/pipermail/llvm-dev/2019-April/131466.html <https://lists.llvm.org/pipermail/llvm-dev/2019-April/131466.html>
> >
> Wonderful! When I asked about this internally, a colleague said they were going
> to create a platform where `getenv` can return `-1`.
> 
> -- 
> Codeplay Software Ltd.
> Company registered in England and Wales, number: 04567874
> Registered office: Regent House, 316 Beulah Hill, London, SE19 3HF
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201103/92665e52/attachment.html>


More information about the llvm-dev mailing list