[libcxx-commits] [PATCH] D59248: [libc++] Do not share an object library to create the static/shared libraries

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 12 13:24:31 PDT 2019


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


================
Comment at: libcxx/lib/CMakeLists.txt:209
     PROPERTIES
+      COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
       LINK_FLAGS    "${LIBCXX_LINK_FLAGS}"
----------------
phosek wrote:
> CMake documentation says that [`COMPILE_FLAGS` is deprecated](https://cmake.org/cmake/help/v3.4/prop_tgt/COMPILE_FLAGS.html) and that we should be using `COMPILE_OPTIONS` or `target_compile_options`.
If that's okay, I'd like to do that as a follow-up change. I'd do:

```
target_compile_options(cxx_shared PRIVATE ${LIBCXX_COMPILE_FLAGS})
target_link_options(cxx_shared PRIVATE ${LIBCXX_LINK_FLAGS})
```

The reason is that if this somehow breaks something (I'm worried that `target_compile_options` is additive where setting the property might overwrite the compile flags for that target, which could be different), at least I won't have to revert the whole patch.


Repository:
  rCXX libc++

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

https://reviews.llvm.org/D59248





More information about the libcxx-commits mailing list