[libcxx-commits] [PATCH] D95972: [libc++] Use init_priority(100) when possible

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 8 03:19:36 PST 2021


mstorsjo added subscribers: thakis, mstorsjo.
mstorsjo added a comment.

CC @thakis

FYI, this change added an inconvenience in builds with clang-cl; the dummy preprocessor line directives (e.g. `# 80 "iostream.cpp" 1 3`) end up output as part of `/showIncludes`, which is what Ninja (and other tools) use for gathering info about the dependencies.

The command output contains this:

  Note: including file:  C:/<builddir>/include/c++/v1\__undef_macros
  [... more of the same ...]
  Note: including file: iostream.cpp

The dependency on iostream.cpp is a dummy (the input file isn't found). This causes ninja builds to always rebuild iostream.cpp every time ninja is invoked, even when nothing has been touched. Running with `ninja -d explain` prints:

  ninja explain: output iostream.cpp of phony edge with no inputs doesn't exist
  ninja explain: iostream.cpp is dirty
  ninja explain: src/CMakeFiles/cxx_shared.dir/iostream.cpp.obj is dirty

But I'm not sure if this is inconvenience enough to do something about it (I guess alternatives is to either use a windows specific mechanism directly, for setting a high enough priority for the constructors, or to just use the regular priority 101, so it doesn't need the dummy source markers).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95972/new/

https://reviews.llvm.org/D95972



More information about the libcxx-commits mailing list