Re: [PATCH v4 5/5] Makefile: add option to build and test libgit-rs and libgit-rs-sys
- From
Josh Steadmon <steadmon@google.com>
- Date
- Oct 14, 2024, 20:13 UTC
- Message-ID
- <jpzziq6a2sepvrrpltahlgvx3kibestargeettnty3q7dk6njn@vizhrfj72g7a>
- In-Reply-To
- <xmqq7cagok3j.fsf@gitster.g>
On 2024.10.09 17:52, Junio C Hamano wrote:
Show 19 quoted lines
> Josh Steadmon <steadmon@google.com> writes: > > > Hmm, I think this may be an unfortunate interaction between Git's `make > > all`, followed by libgit-sys's `build.rs` calling make again (with > > different CFLAGS, specifically '-fvisibility=hidden') to build > > libgitpub.a. So then the second `make all` has to rebuild everything due > > to changing the CFLAGS back, and then libgit-sys has to rebuild > > libgitpub.a once again. > > Ah, OK, if we need to compile in two different ways, then it is a > matter of giving a dedicated *.o build directory to each, and until > that happens, the object files for Git proper and libgit-sys would > try to stomp on each other. > > I thought Patrick's build procedure update has out-of-tree build as > one of its goals, in which case we may be able to piggy-back on the > effort once it starts to stabilize. > > Thanks.
Actually, including '-fvisibility=hidden' by default doesn't break the main build, so I think we can just add this to BASIC_CFLAGS if INCLUDE_LIBGIT_RS is set. I'll do that (and add documentation as requested) and restore this patch in V5.