[all-commits] [llvm/llvm-project] 515afe: [libc++] Change workaround for init_priority((100)...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Mon Dec 13 11:38:09 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 515afe8b13a659a7a979280ed87891e74cc7915c
https://github.com/llvm/llvm-project/commit/515afe8b13a659a7a979280ed87891e74cc7915c
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2021-12-13 (Mon, 13 Dec 2021)
Changed paths:
M libcxx/src/chrono.cpp
A libcxx/src/chrono_system_time_init.h
M libcxx/src/experimental/memory_resource.cpp
A libcxx/src/experimental/memory_resource_init_helper.h
M libcxx/src/iostream.cpp
A libcxx/src/iostream_init.h
Log Message:
-----------
[libc++] Change workaround for init_priority((100)) outside of system headers
We had previously been using a different workaround for pretending that
we were inside a system header, however it had some undesirable effects
on dependency parsing for build systems, as explained in [1].
This patch changes the workaround to use `#pragma GCC system_header`,
which shouldn't suffer from the same issue. Unfortunately, it is a lot
more verbose. The issue is that `#pragma GCC system_header` is ignored
when we are inside a source file, so we have to create a header just for
the sake of using it. IMO this seems like an artificial restriction
without much benefit, but investigating that is a different story.
For now, this should at least solve build system problems at the
cost of some readability.
[1]: https://reviews.llvm.org/D95972#3178968
Differential Revision: https://reviews.llvm.org/D115334
More information about the All-commits
mailing list