[libc-commits] [PATCH] D76271: [libc] Add a new rule `add_object`.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Mar 17 09:38:21 PDT 2020


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

In D76271#1926018 <https://reviews.llvm.org/D76271#1926018>, @abrachet wrote:

> Could you show how you are using this? I have tried like:
>
>   add_object(
>     special
>     SRC
>       special.cpp
>     COMPILE_OPTIONS
>       -Wframe-larger-than=0
>   )
>  
>   add_entrypoint_object(
>     entrypoint
>     SRCS
>       entrypoint.cpp
>     HDRS
>        entrypoint.h
>     DEPENDS
>        special
>   )   
>
>
> Doesn't work, entrypoint doesn't link against special.o


I have explained how to use it on the `sigaction` review page.



================
Comment at: libc/cmake/modules/LLVMLibCRules.cmake:112
+
+  add_library(
+    ${target_name}
----------------
abrachet wrote:
> Won't `add_library` compile using `CMAKE_CXX_FLAGS`?
Yes, but any new compile options you add get added at the end and hence will override (if required) the options earlier in the line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76271





More information about the libc-commits mailing list