Re: LLVM compile failing in seawasp
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, didier <did447@gmail.com>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Pg Hackers <pgsql-hackers@lists.postgresql.org>, buildfarm@coelho.net
Date: 2019-07-28T07:47:17Z
Lists: pgsql-hackers
Hello Thomas, >> I would just #undef Min for our small number of .cpp files that >> include LLVM headers. It's not as though you need it in C++, which >> has std::min() from <algorithm>. > > Like so. Fixes the problem for me (llvm-devel-9.0.d20190712). Hmmm. Not so nice, but if it works, why not, at least the impact is much smaller than renaming. Note that the Min macro is used in several pg headers (ginblock.h, ginxlog.h, hash.h, simplehash.h, spgist_private.h), so you might really need it depending on what is being done later. Otherwise, why not simply move llvm C++ includes *before* postgres includes? They should be fully independent anyway, so the order should not matter? -- Fabien.
Commits
-
Avoid macro clash with LLVM 9.
- 0ef70bbaddb6 11.5 landed
- 180825fe43ec 12.0 landed
- a2a777d01197 13.0 landed