diff options
| author | pastdue <30942300+past-due@users.noreply.github.com> | 2021-05-24 18:14:14 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-24 15:14:14 -0700 |
| commit | 8f8a4f8aeed0a2eec0cc16137f1641cbd69fe15b (patch) | |
| tree | b04a09e42154ba284bc9dccdaa503dcffdd39d1b /ports | |
| parent | 449b85b1e5acb5aea2de7a8efe04608b2df55fe7 (diff) | |
| download | vcpkg-8f8a4f8aeed0a2eec0cc16137f1641cbd69fe15b.tar.gz vcpkg-8f8a4f8aeed0a2eec0cc16137f1641cbd69fe15b.zip | |
[libsodium] Fix mingw builds (#18025)
* [libsodium] Fix mingw builds
* Run x-add-version libsodium
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/libsodium/CMakeLists.txt | 31 | ||||
| -rw-r--r-- | ports/libsodium/vcpkg.json | 4 |
2 files changed, 27 insertions, 8 deletions
diff --git a/ports/libsodium/CMakeLists.txt b/ports/libsodium/CMakeLists.txt index 88836cc2f..429ab4c29 100644 --- a/ports/libsodium/CMakeLists.txt +++ b/ports/libsodium/CMakeLists.txt @@ -132,7 +132,6 @@ else () INTERFACE
-flax-vector-conversions
-fvisibility=hidden
- -fPIC
-fwrapv
-Wall
-Wextra
@@ -162,11 +161,31 @@ else () -Wswitch-enum
#-Wvariable-decl
-Wwrite-strings
- -Wl,-z,relro
- -Wl,-z,now
- -Wl,-z,noexecstack
)
+ if (NOT MINGW)
+ target_compile_options(${PROJECT_NAME}_config_private
+ INTERFACE
+ -fPIC
+ -Wl,-z,relro
+ -Wl,-z,now
+ -Wl,-z,noexecstack
+ )
+ endif()
+
+ if (MINGW)
+ target_compile_options(${PROJECT_NAME}_config_private
+ INTERFACE
+ -fno-asynchronous-unwind-tables
+ )
+ target_link_options(${PROJECT_NAME}_config_private
+ INTERFACE
+ -Wl,--dynamicbase
+ -Wl,--high-entropy-va
+ -Wl,--nxcompat
+ )
+ endif()
+
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
target_compile_options(${PROJECT_NAME}_config_private
@@ -187,11 +206,11 @@ else () target_compile_options(${PROJECT_NAME}_config_public INTERFACE -pthread)
endif ()
- if (ENABLE_SSP)
+ if (ENABLE_SSP AND NOT MINGW)
target_compile_options(${PROJECT_NAME}_config_private INTERFACE -fstack-protector-all)
endif ()
- if (ENABLE_PIE)
+ if (ENABLE_PIE AND NOT MINGW)
target_compile_options(${PROJECT_NAME}_config_private INTERFACE -fPIE)
endif ()
diff --git a/ports/libsodium/vcpkg.json b/ports/libsodium/vcpkg.json index 7c12a7fed..522e476d3 100644 --- a/ports/libsodium/vcpkg.json +++ b/ports/libsodium/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libsodium", - "version-string": "1.0.18", - "port-version": 4, + "version": "1.0.18", + "port-version": 5, "description": "A modern and easy-to-use crypto library", "homepage": "https://github.com/jedisct1/libsodium", "dependencies": [ |
