[libcxx-commits] [PATCH] D68343: [libc++] Move the linker script generation step to CMake

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 2 11:58:40 PDT 2019


ldionne marked an inline comment as done.
ldionne added a comment.

__Sorry, I sent the previous comment while I was still drafting.__

@phosek @thakis I do have one question. Is there a reason why we want the linker script to look like

  INPUT(libc++.so.1 -lunwind -lc++abi)

instead of

  INPUT(libc++.so.1 -lpthread -lc <etc...> -lunwind -lc++abi)

It seems like it should be OK to include `-lpthread` and friends in the linker script, since we need to link against those too, no?



================
Comment at: libcxx/cmake/Modules/DefineLinkerScript.cmake:47
+    COMMAND "${CMAKE_COMMAND}" -E echo "${linker_script}" > "${symlink}"
+    COMMENT "Generating linker script: '${linker_script}' as file ${symlink}"
+    VERBATIM
----------------
ldionne wrote:
> thakis wrote:
> > We recently made it so that the script is silent during normal operation. It looks like this adds the build output back. Could you omit this please? Successful build steps should be silent.
> This build output is only included if the verbose mode of the CMake generator is used.
> This build output is only included if the verbose mode of the CMake generator is used.

Scratch that, I was in the process of verifying the claim when I sent out the comment!

So it turns out the comment is only printed when the Makefile generator is used, but I think you guys use Ninja. LMK if you still want me to remove it.

Also, if you really want your build not to output anything when it's successful, there's more you need to do than just suppress these intermediate status updates, since several other tools will have intermediate output too.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68343





More information about the libcxx-commits mailing list