[PATCH] D146665: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. mysterymath marked an inline comment as done. Closed by commit rG0430324289f2: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS. (authored by mysterymath). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146665/new/ https://reviews.llvm.org/D146665 Files: clang/cmake/caches/Fuchsia-stage2.cmake clang/cmake/caches/Fuchsia.cmake Index: clang/cmake/caches/Fuchsia.cmake === --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -1,5 +1,8 @@ # 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 "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") @@ -33,6 +36,7 @@ CURL_ROOT OpenSSL_ROOT FUCHSIA_ENABLE_LLDB + FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS LLDB_ENABLE_CURSES LLDB_ENABLE_LIBEDIT CMAKE_FIND_PACKAGE_PREFER_CONFIG @@ -156,17 +160,33 @@ llvm-test-depends test-suite test-depends - distribution - install-distribution - install-distribution-stripped - install-distribution-toolchain clang) -set(FUCHSIA_ENABLE_LLDB OFF CACHE BOOL "Enable LLDB") +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 check-lldb lldb-test-depends) + list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS +check-lldb +lldb-test-depends +debugger-distribution +install-debugger-distribution +install-debugger-distribution-stripped +install-debugger-distribution-toolchain) endif() + set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "") set(CLANG_BOOTSTRAP_TARGETS ${_FUCHSIA_BOOTSTRAP_TARGETS} CACHE STRING "") Index: clang/cmake/caches/Fuchsia-stage2.cmake === --- clang/cmake/caches/Fuchsia-stage2.cmake +++ clang/cmake/caches/Fuchsia-stage2.cmake @@ -1,5 +1,8 @@ # 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 "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") @@ -326,7 +329,7 @@ scan-build-py CACHE STRING "") -set(_FUCHSIA_DISTRIBUTION_COMPONENTS +set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS clang lld clang-apply-replacements @@ -341,13 +344,31 @@ find-all-symbols builtins runtimes - ${LLVM_TOOLCHAIN_TOOLS}) + ${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_ENABLE_LLDB OFF CACHE BOOL "Enable LLDB") 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_DISTRIBUTION_COMPONENTS lldb liblldb lldb-server lldb-argdumper) + list(APPEND _FUCHSIA_DISTRIBUTIONS Debugger) + set(LLVM_Debugger_DISTRIBUTION_COMPONENTS +lldb +liblldb +lldb-server +lldb-argdumper +CACHE STRING "") +endif() + +if(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS) + set(LLVM_DISTRIBUTIONS ${_FUCHSIA_DISTRIBUTIONS} CACHE STRING "") endif() set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "") -set(LLVM_DISTRIBUTION_COMPONENTS ${_FUCHSIA_DISTRIBUTION_COMPONENTS} CACHE STRING "") ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D146665: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146665/new/ https://reviews.llvm.org/D146665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D146665: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.
mysterymath marked an inline comment as done. mysterymath added inline comments. Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:3 +option(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS "Use multiple distributions") +option(FUCHSIA_ENABLE_LLDB "Enable LLDB") phosek wrote: > Could we use multiple distributions unconditionally? Yep, this is just the feature flag mechanism to prevent breaking the build and provide a safe revert. As soon as this and its partner change are stable, I'll yank the flag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146665/new/ https://reviews.llvm.org/D146665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D146665: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.
phosek added inline comments. Comment at: clang/cmake/caches/Fuchsia-stage2.cmake:3 +option(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS "Use multiple distributions") +option(FUCHSIA_ENABLE_LLDB "Enable LLDB") Could we use multiple distributions unconditionally? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146665/new/ https://reviews.llvm.org/D146665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D146665: [Fuchsia] Add FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS.
mysterymath created this revision. mysterymath added reviewers: haowei, phosek. Herald added a subscriber: abrachet. Herald added a project: All. mysterymath requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This flag causes the toolchain distribution to be built using LLVM CMake's multiple distribution feature. The distribution* family of CMake targets would be replaced with the toolchain-distribution* family. This shouldn't otherwise affect the semantics of the build, but it sets up the ability to split out the LLDB build from the main distribution used by Fuchsia. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D146665 Files: clang/cmake/caches/Fuchsia-stage2.cmake clang/cmake/caches/Fuchsia.cmake Index: clang/cmake/caches/Fuchsia.cmake === --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -1,5 +1,8 @@ # 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 "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") @@ -33,6 +36,7 @@ CURL_ROOT OpenSSL_ROOT FUCHSIA_ENABLE_LLDB + FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS LLDB_ENABLE_CURSES LLDB_ENABLE_LIBEDIT CMAKE_FIND_PACKAGE_PREFER_CONFIG @@ -156,17 +160,33 @@ llvm-test-depends test-suite test-depends - distribution - install-distribution - install-distribution-stripped - install-distribution-toolchain clang) -set(FUCHSIA_ENABLE_LLDB OFF CACHE BOOL "Enable LLDB") +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 check-lldb lldb-test-depends) + list(APPEND _FUCHSIA_BOOTSTRAP_TARGETS +check-lldb +lldb-test-depends +debugger-distribution +install-debugger-distribution +install-debugger-distribution-stripped +install-debugger-distribution-toolchain) endif() + set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "") set(CLANG_BOOTSTRAP_TARGETS ${_FUCHSIA_BOOTSTRAP_TARGETS} CACHE STRING "") Index: clang/cmake/caches/Fuchsia-stage2.cmake === --- clang/cmake/caches/Fuchsia-stage2.cmake +++ clang/cmake/caches/Fuchsia-stage2.cmake @@ -1,5 +1,8 @@ # 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 "") set(PACKAGE_VENDOR Fuchsia CACHE STRING "") @@ -326,7 +329,7 @@ scan-build-py CACHE STRING "") -set(_FUCHSIA_DISTRIBUTION_COMPONENTS +set(LLVM_Toolchain_DISTRIBUTION_COMPONENTS clang lld clang-apply-replacements @@ -341,13 +344,31 @@ find-all-symbols builtins runtimes - ${LLVM_TOOLCHAIN_TOOLS}) + ${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_ENABLE_LLDB OFF CACHE BOOL "Enable LLDB") 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_DISTRIBUTION_COMPONENTS lldb liblldb lldb-server lldb-argdumper) + list(APPEND _FUCHSIA_DISTRIBUTIONS Debugger) + set(LLVM_Debugger_DISTRIBUTION_COMPONENTS +lldb +liblldb +lldb-server +lldb-argdumper +CACHE STRING "") +endif() + +if(FUCHSIA_USE_MULTIPLE_DISTRIBUTIONS) + set(LLVM_DISTRIBUTIONS ${_FUCHSIA_DISTRIBUTIONS} CACHE STRING "") endif() set(LLVM_ENABLE_PROJECTS ${_FUCHSIA_ENABLE_PROJECTS} CACHE STRING "") -set(LLVM_DISTRIBUTION_COMPONENTS ${_FUCHSIA_DISTRIBUTION_COMPONENTS} CACHE STRING "") ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits