haowei created this revision. haowei added a reviewer: phosek. Herald added a subscriber: abrachet. Herald added a project: All. haowei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This patch simplified the BOOTSTRAP_ flags, allowing them to be passed through from regular flags. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143288 Files: clang/cmake/caches/Fuchsia.cmake Index: clang/cmake/caches/Fuchsia.cmake =================================================================== --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -17,6 +17,34 @@ set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") +# Passthrough stage1 flags to stage1. +set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH + LLVM_ENABLE_ZLIB + ZLIB_INCLUDE_DIR + ZLIB_LIBRARY + LLVM_ENABLE_ZSTD + zstd_DIR + LLVM_ENABLE_LIBXML2 + LibXml2_ROOT + LLVM_ENABLE_CURL + CURL_ROOT + OpenSSL_ROOT + CMAKE_FIND_PACKAGE_PREFER_CONFIG + CMAKE_SYSROOT + CMAKE_MODULE_LINKER_FLAGS + CMAKE_SHARED_LINKER_FLAGS + CMAKE_EXE_LINKER_FLAGS +) + +foreach(variable ${_FUCHSIA_BOOTSTRAP_PASSTHROUGH}) + get_property(is_value_set CACHE ${variable} PROPERTY VALUE SET) + if(${is_value_set}) + get_property(value CACHE ${variable} PROPERTY VALUE) + get_property(type CACHE ${variable} PROPERTY TYPE) + set(BOOTSTRAP_${variable} "${value}" CACHE ${type} "") + endif() +endforeach() + if(WIN32) set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "") endif()
Index: clang/cmake/caches/Fuchsia.cmake =================================================================== --- clang/cmake/caches/Fuchsia.cmake +++ clang/cmake/caches/Fuchsia.cmake @@ -17,6 +17,34 @@ set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "") set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "") +# Passthrough stage1 flags to stage1. +set(_FUCHSIA_BOOTSTRAP_PASSTHROUGH + LLVM_ENABLE_ZLIB + ZLIB_INCLUDE_DIR + ZLIB_LIBRARY + LLVM_ENABLE_ZSTD + zstd_DIR + LLVM_ENABLE_LIBXML2 + LibXml2_ROOT + LLVM_ENABLE_CURL + CURL_ROOT + OpenSSL_ROOT + CMAKE_FIND_PACKAGE_PREFER_CONFIG + CMAKE_SYSROOT + CMAKE_MODULE_LINKER_FLAGS + CMAKE_SHARED_LINKER_FLAGS + CMAKE_EXE_LINKER_FLAGS +) + +foreach(variable ${_FUCHSIA_BOOTSTRAP_PASSTHROUGH}) + get_property(is_value_set CACHE ${variable} PROPERTY VALUE SET) + if(${is_value_set}) + get_property(value CACHE ${variable} PROPERTY VALUE) + get_property(type CACHE ${variable} PROPERTY TYPE) + set(BOOTSTRAP_${variable} "${value}" CACHE ${type} "") + endif() +endforeach() + if(WIN32) set(LLVM_USE_CRT_RELEASE "MT" CACHE STRING "") endif()
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits