Skip to content

Commit

Permalink
[Fuchsia][CMake] Always use multiple distribution model.
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed Mar 28, 2023
1 parent f9e995b commit 498e150
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
15 changes: 2 additions & 13 deletions clang/cmake/caches/Fuchsia-stage2.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file sets up a CMakeCache for the second stage of a Fuchsia toolchain build.

option(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS "Use multiple distributions")
option(FUCHSIA_ENABLE_LLDB "Enable LLDB")

set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
Expand Down Expand Up @@ -347,16 +346,9 @@ set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS
${LLVM_TOOLCHAIN_TOOLS}
CACHE STRING "")

if(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS)
set(_FUCHSIA_DISTRIBUTIONS Toolchain)
else()
set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_Toolchain_DISTRIBUTION_COMPONENTS} CACHE STRING "")
endif()
set(_FUCHSIA_DISTRIBUTIONS Toolchain)

if(FUCHSIA_ENABLE_LLDB)
if(NOT FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS)
message(FATAL_ERROR "FUCHSIA_ENABLE_LLDB requires FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.")
endif()
list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb)
list(APPEND _FUCHSIA_DISTRIBUTIONS Debugger)
set(LLVM_Debugger_DISTRIBUTION_COMPONENTS
Expand All @@ -367,8 +359,5 @@ if(FUCHSIA_ENABLE_LLDB)
CACHE STRING "")
endif()

if(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS)
set(LLVM_DISTRIBUTIONS ${_FUCHSIA_DISTRIBUTIONS} CACHE STRING "")
endif()

set(LLVM_DISTRIBUTIONS ${_FUCHSIA_DISTRIBUTIONS} CACHE STRING "")
set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "")
20 changes: 4 additions & 16 deletions clang/cmake/caches/Fuchsia.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file sets up a CMakeCache for a Fuchsia toolchain build.

option(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS "Use multiple distributions")
option(FUCHSIA_ENABLE_LLDB "Enable LLDB")

set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
Expand Down Expand Up @@ -36,7 +35,6 @@ set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH
CURL_ROOT
OpenSSL_ROOT
FUCHSIA_ENABLE_LLDB
FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS
LLDB_ENABLE_CURSES
LLDB_ENABLE_LIBEDIT
CMAKE_FIND_PACKAGE_PREFER_CONFIG
Expand Down Expand Up @@ -160,22 +158,12 @@ set(_FUCHSIA_BOOTSTRAP_TARGETS
llvm-test-depends
test-suite
test-depends
toolchain-distribution
install-toolchain-distribution
install-toolchain-distribution-stripped
install-toolchain-distribution-toolchain
clang)

if(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS)
list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS
toolchain-distribution
install-toolchain-distribution
install-toolchain-distribution-stripped
install-toolchain-distribution-toolchain)
else()
list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS
distribution
install-distribution
install-distribution-stripped
install-distribution-toolchain)
endif()

if(FUCHSIA_ENABLE_LLDB)
list(APPEND _FUCHSIA_ENABLE_PROJECTS lldb)
list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS
Expand Down

0 comments on commit 498e150

Please sign in to comment.