[PATCH] D145449: [Fuchsia] Add LLDB options to stage 1 cmake.

Daniel Thornburgh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 7 10:18:22 PST 2023


mysterymath added inline comments.


================
Comment at: clang/cmake/caches/Fuchsia.cmake:167
+if(FUCHSIA_ENABLE_LLDB)
+  list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb)
+endif()
----------------
haowei wrote:
> You probably need a `string(REPLACE ";" "|" value "${_FUCHSIA_ENABLE_PROJECTS}")` after append a value. As by default cmake use `|` to separate items.
> But do you actually need a `_FUCHSIA_ENABLE_PROJECTS` variable, couldn't you just append `lldb` at the end of `LLVM_ENABLE_PROJECTS` here?
> You probably need a `string(REPLACE ";" "|" value "${_FUCHSIA_ENABLE_PROJECTS}")` after append a value. As by default cmake use `|` to separate items.
Hm? CMake's list separator is the semicolon: https://cmake.org/cmake/help/latest/command/list.html

> But do you actually need a `_FUCHSIA_ENABLE_PROJECTS` variable, couldn't you just append `lldb` at the end of `LLVM_ENABLE_PROJECTS` here?
`(list APPEND ...)` doesn't work on cache variables. If I were to use the (set CACHE FORCE) idiom instead, it would append lldb each time a configure occurs. The idea here is to have FUCHSIA_ENABLE_LLDB affect the defaults, but to respect whatever's already in the CMake cache otherwise.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145449



More information about the cfe-commits mailing list