Skip to content

Commit

Permalink
Merge pull request #115 from rimrul/mingw-w64-clang-18.1.2
Browse files Browse the repository at this point in the history
clang: update to 18.1.6
  • Loading branch information
rimrul authored Jun 4, 2024
2 parents 7930f56 + 062f600 commit 0680efc
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 200 deletions.
16 changes: 0 additions & 16 deletions mingw-w64-clang/0002-Fix-Findzstd-on-MINGW.patch

This file was deleted.

75 changes: 0 additions & 75 deletions mingw-w64-clang/0005-aarch64-unwind-seh.patch

This file was deleted.

32 changes: 32 additions & 0 deletions mingw-w64-llvm/0002-Fix-Findzstd-on-MINGW.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
--- a/cmake/modules/Findzstd.cmake
+++ b/cmake/modules/Findzstd.cmake
@@ -16,6 +16,8 @@
set(zstd_STATIC_LIBRARY_SUFFIX "\\${CMAKE_STATIC_LIBRARY_SUFFIX}$")
endif()

+find_package(zstd CONFIG QUIET)
+if(NOT zstd_FOUND)
find_path(zstd_INCLUDE_DIR NAMES zstd.h)
find_library(zstd_LIBRARY NAMES zstd zstd_static)
find_library(zstd_STATIC_LIBRARY NAMES
@@ -27,16 +29,17 @@
zstd DEFAULT_MSG
zstd_LIBRARY zstd_INCLUDE_DIR
)
+endif()

if(zstd_FOUND)
- if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$")
+ if(zstd_LIBRARY MATCHES "${zstd_STATIC_LIBRARY_SUFFIX}$" AND NOT MINGW)
set(zstd_STATIC_LIBRARY "${zstd_LIBRARY}")
elseif (NOT TARGET zstd::libzstd_shared)
add_library(zstd::libzstd_shared SHARED IMPORTED)
- if(MSVC)
+ if(WIN32)
# IMPORTED_LOCATION is the path to the DLL and IMPORTED_IMPLIB is the "library".
get_filename_component(zstd_DIRNAME "${zstd_LIBRARY}" DIRECTORY)
- string(REGEX REPLACE "${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
+ string(REGEX REPLACE "\\${CMAKE_INSTALL_LIBDIR}$" "${CMAKE_INSTALL_BINDIR}" zstd_DIRNAME "${zstd_DIRNAME}")
get_filename_component(zstd_BASENAME "${zstd_LIBRARY}" NAME)
string(REGEX REPLACE "\\${CMAKE_LINK_LIBRARY_SUFFIX}$" "${CMAKE_SHARED_LIBRARY_SUFFIX}" zstd_BASENAME "${zstd_BASENAME}")
set_target_properties(zstd::libzstd_shared PROPERTIES
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ diff --git a/lib/Support/CMakeLists.txt b/lib/Support/CMakeLists.txt
index 0a8e3897cce..de9cda5dda3 100644
--- a/lib/Support/CMakeLists.txt
+++ b/lib/Support/CMakeLists.txt
@@ -6,6 +6,9 @@ set(system_libs)
@@ -41,6 +41,9 @@ set(system_libs)
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32)
set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32 ws2_32)
+ if( MINGW )
+ set(system_libs ${system_libs} pthread)
+ endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--- a/MinGW/Options.td
+++ b/MinGW/Options.td
@@ -165,6 +165,8 @@ def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
@@ -223,6 +223,8 @@ def alias_undefined_u: JoinedOrSeparate<["-"], "u">, Alias<undefined>;
// Ignored options
def: Joined<["-"], "O">;
def: F<"as-needed">;
def: F<"build-id">;
+def: F<"default-image-base-high">;
+def: F<"default-image-base-low">;
def: F<"disable-auto-image-base">;
Expand Down
Loading

0 comments on commit 0680efc

Please sign in to comment.