diff --git a/cmake/modules/SwiftSharedCMakeConfig.cmake b/cmake/modules/SwiftSharedCMakeConfig.cmake index 26ada5dc9acb0..79a786e5ca122 100644 --- a/cmake/modules/SwiftSharedCMakeConfig.cmake +++ b/cmake/modules/SwiftSharedCMakeConfig.cmake @@ -230,7 +230,7 @@ macro(swift_common_standalone_build_config_cmark product) get_filename_component(CMARK_LIBRARY_DIR "${${product}_CMARK_LIBRARY_DIR}" ABSOLUTE) - set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src") + set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src/include") set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src") file(TO_CMAKE_PATH "${CMARK_MAIN_INCLUDE_DIR}" CMARK_MAIN_INCLUDE_DIR) @@ -290,7 +290,7 @@ macro(swift_common_unified_build_config product) ABSOLUTE) set(CMARK_BUILD_INCLUDE_DIR "${PATH_TO_CMARK_BUILD}/src") - set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src") + set(CMARK_MAIN_INCLUDE_DIR "${CMARK_MAIN_SRC_DIR}/src/include") endif() include_directories( diff --git a/lib/Markup/CMakeLists.txt b/lib/Markup/CMakeLists.txt index b44efe1b17004..793e3e0a5d7a7 100644 --- a/lib/Markup/CMakeLists.txt +++ b/lib/Markup/CMakeLists.txt @@ -3,8 +3,8 @@ add_swift_host_library(swiftMarkup STATIC LineList.cpp Markup.cpp) target_link_libraries(swiftMarkup PRIVATE - libcmark_static) + libcmark-gfm_static) target_compile_definitions(swiftMarkup PRIVATE - CMARK_STATIC_DEFINE) + CMARK_GFM_STATIC_DEFINE) diff --git a/lib/Markup/Markup.cpp b/lib/Markup/Markup.cpp index 04f6cb50973cb..61275f19c0dc7 100644 --- a/lib/Markup/Markup.cpp +++ b/lib/Markup/Markup.cpp @@ -15,7 +15,7 @@ #include "swift/AST/Comment.h" #include "swift/Markup/LineList.h" #include "swift/Markup/Markup.h" -#include "cmark.h" +#include "cmark-gfm.h" using namespace swift; using namespace markup; diff --git a/tools/SourceKit/lib/SwiftLang/CMakeLists.txt b/tools/SourceKit/lib/SwiftLang/CMakeLists.txt index f8a7c45a2cd02..c0292bf323faa 100644 --- a/tools/SourceKit/lib/SwiftLang/CMakeLists.txt +++ b/tools/SourceKit/lib/SwiftLang/CMakeLists.txt @@ -44,7 +44,7 @@ target_link_libraries(SourceKitSwiftLang PRIVATE swiftSyntax swiftOption swiftSymbolGraphGen - libcmark_static + libcmark-gfm_static # Clang dependencies. clangIndex clangFormat diff --git a/utils/swift_build_support/swift_build_support/products/cmark.py b/utils/swift_build_support/swift_build_support/products/cmark.py index d234bfde362fd..bde199b37e0de 100644 --- a/utils/swift_build_support/swift_build_support/products/cmark.py +++ b/utils/swift_build_support/swift_build_support/products/cmark.py @@ -52,6 +52,8 @@ def build(self, host_target): self.cmake_options.define('CMAKE_BUILD_TYPE:STRING', self.args.cmark_build_variant) + self.cmake_options.define('CMARK_THREADING', 'ON') + (platform, arch) = host_target.split('-') common_c_flags = ' '.join(self.common_cross_c_flags(platform, arch)) diff --git a/utils/update_checkout/update-checkout-config.json b/utils/update_checkout/update-checkout-config.json index c8eaebce628f1..672e1b358dea1 100644 --- a/utils/update_checkout/update-checkout-config.json +++ b/utils/update_checkout/update-checkout-config.json @@ -89,7 +89,7 @@ "repos": { "llvm-project": "stable/20211026", "swift": "main", - "cmark": "main", + "cmark": "gfm", "llbuild": "main", "swift-tools-support-core": "main", "swiftpm": "main", @@ -131,7 +131,7 @@ "repos": { "llvm-project": "stable/20211026", "swift": "rebranch", - "cmark": "main", + "cmark": "gfm", "llbuild": "main", "swift-tools-support-core": "main", "swiftpm": "main", @@ -282,7 +282,7 @@ "repos": { "llvm-project": "next", "swift": "next", - "cmark": "main", + "cmark": "gfm", "llbuild": "main", "swift-tools-support-core": "main", "swiftpm": "main",