[libc-commits] [libc] [libc][cmake] reset COMPILE_DEFINITIONS (PR #77810)
via libc-commits
libc-commits at lists.llvm.org
Thu Jan 11 11:46:06 PST 2024
lntue wrote:
> > I would guess that the debug macro is being set based on the cmake flag -DCMAKE_BUILD_TYPE=Debug, and we might want to respect that in our build. Other than that this looks fine to me.
>
> I just tested that hypothesis by configuring with `-DCMAKE_BUILD_TYPE=Release` (and clearing the cmake cache). You're right; the list of preprocessor defines changes to:
>
> * _GNU_SOURCE
> * _FILE_OFFSET_BITS=64
> * _LARGEFILE_SOURCE_FILE_OFFSET_BITS=64
> * __STDC_CONSTANT_MACROS
> * __STDC_FORMAT_MACROS
> * __STDC_LIMIT_MACROS
>
> So I think it makes sense to:
>
> 1. clear everything
> 2. re-set _DEBUG if necessary.
>
> I'll add 2.
In that case, since there might be more of these with different configurations and invocation, can you printout `COMPILE_DEFINITIONS` before clearing it in verbose mode, and/or just remove these flags for now?
https://github.com/llvm/llvm-project/pull/77810
More information about the libc-commits
mailing list