diff --git a/bolt/unittests/Core/CMakeLists.txt b/bolt/unittests/Core/CMakeLists.txt index 54e8ea10cda12..ab7e342dc9e77 100644 --- a/bolt/unittests/Core/CMakeLists.txt +++ b/bolt/unittests/Core/CMakeLists.txt @@ -20,7 +20,6 @@ target_link_libraries(CoreTests LLVMBOLTRewrite LLVMBOLTProfile LLVMBOLTUtils - LLVMTestingSupport ) foreach (tgt ${BOLT_TARGETS_TO_BUILD}) diff --git a/bolt/unittests/Core/MemoryMaps.cpp b/bolt/unittests/Core/MemoryMaps.cpp index b0cab5431bdd3..dc0051a7c43ee 100644 --- a/bolt/unittests/Core/MemoryMaps.cpp +++ b/bolt/unittests/Core/MemoryMaps.cpp @@ -12,7 +12,6 @@ #include "llvm/DebugInfo/DWARF/DWARFContext.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/TargetSelect.h" -#include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" using namespace llvm; @@ -110,7 +109,7 @@ TEST_P(MemoryMapsTester, ParseMultipleSegments) { Error Err = DA.preprocessProfile(*BC); // Ignore errors from perf2bolt when parsing memory events later on. - ASSERT_THAT_ERROR(std::move(Err), Succeeded()); + ASSERT_FALSE(!!Err) << "Expected success"; auto &BinaryMMapInfo = DA.getBinaryMMapInfo(); auto El = BinaryMMapInfo.find(Pid); diff --git a/bolt/unittests/Profile/CMakeLists.txt b/bolt/unittests/Profile/CMakeLists.txt index ce01c6c4b949e..4d468372f27fc 100644 --- a/bolt/unittests/Profile/CMakeLists.txt +++ b/bolt/unittests/Profile/CMakeLists.txt @@ -15,8 +15,6 @@ target_link_libraries(ProfileTests PRIVATE LLVMBOLTCore LLVMBOLTProfile - LLVMTargetParser - LLVMTestingSupport ) foreach (tgt ${BOLT_TARGETS_TO_BUILD}) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index e1fe22393eebb..b4e89a2b18559 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -332,6 +332,11 @@ Non-comprehensive list of changes in this release - Clang no longer rejects reinterpret_cast conversions between indirect ARC-managed pointers and other pointer types. The prior behavior was overly strict and inconsistent with the ARC specification. +- On non-Windows platforms, Clang now builds as a large shared library, + ``libclang-cpp``, by default. To revert to the old behavior of producing and + linking static libraries, pass ``-DCLANG_LINK_CLANG_DYLIB=OFF`` to CMake when + configuring your build. The new behavior matches LLVM, which also builds as a + large shared library. New Compiler Flags ------------------ diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 4b9e70fad2152..cd2adf1cddace 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -919,14 +919,22 @@ if(NOT MSVC OR LLVM_BUILD_LLVM_DYLIB_VIS) set(CAN_BUILD_LLVM_DYLIB ON) endif() -cmake_dependent_option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" OFF +# Link the tools against the libllvm DSO by default. +set(LLVM_LINK_LLVM_DYLIB_default ON) +if (BUILD_SHARED_LIBS OR WIN32) + set(LLVM_LINK_LLVM_DYLIB_default OFF) +endif() + +cmake_dependent_option(LLVM_LINK_LLVM_DYLIB "Link tools against the libllvm dynamic library" + "${LLVM_LINK_LLVM_DYLIB_default}" "CAN_BUILD_LLVM_DYLIB" OFF) set(LLVM_BUILD_LLVM_DYLIB_default OFF) if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LLVM_C_DYLIB) set(LLVM_BUILD_LLVM_DYLIB_default ON) endif() -cmake_dependent_option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default} +cmake_dependent_option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" + "${LLVM_BUILD_LLVM_DYLIB_default}" "CAN_BUILD_LLVM_DYLIB" OFF) cmake_dependent_option(LLVM_DYLIB_EXPORT_INLINES "Force inline members of classes to be DLL exported when diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md index 4a1005667692d..b9d4673a93ac4 100644 --- a/llvm/docs/ReleaseNotes.md +++ b/llvm/docs/ReleaseNotes.md @@ -90,6 +90,11 @@ Changes to LLVM infrastructure Changes to building LLVM ------------------------ +* On non-Windows platforms, LLVM now builds as a large shared library, `libLLVM`, + by default. To revert to the old behavior of producing and linking static + libraries, pass ``-DLLVM_LINK_LLVM_DYLIB=OFF`` to CMake when configuring your + build. + Changes to TableGen -------------------