aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch')
-rw-r--r--vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch b/vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch
new file mode 100644
index 0000000..456978d
--- /dev/null
+++ b/vcpkg/ports/zstd/fix-emscripten-and-clang-cl.patch
@@ -0,0 +1,31 @@
+diff --git a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
+index 5f381c6..f1e9b32 100644
+--- a/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
++++ b/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
+@@ -79,10 +79,22 @@ macro(ADD_ZSTD_COMPILATION_FLAGS)
+ endif ()
+ # Add noexecstack flags
+ # LDFLAGS
+- EnableCompilerFlag("-Wl,-z,noexecstack" false false true)
+- # CFLAGS & CXXFLAGS
+- EnableCompilerFlag("-Qunused-arguments" true true false)
+- EnableCompilerFlag("-Wa,--noexecstack" true true false)
++ if(MSVC)
++ # UNICODE SUPPORT
++ EnableCompilerFlag("/D_UNICODE" true true false)
++ EnableCompilerFlag("/DUNICODE" true true false)
++ # Enable asserts in Debug mode
++ if (CMAKE_BUILD_TYPE MATCHES "Debug")
++ EnableCompilerFlag("/DDEBUGLEVEL=1" true true false)
++ endif ()
++ else()
++ if(NOT EMSCRIPTEN)
++ EnableCompilerFlag("-z noexecstack" false false true)
++ endif()
++ # CFLAGS & CXXFLAGS
++ EnableCompilerFlag("-Qunused-arguments" true true false)
++ EnableCompilerFlag("-Wa,--noexecstack" true true false)
++ endif()
+ # NOTE: Using 3 nested ifs because the variables are sometimes
+ # empty if the condition is false, and sometimes equal to false.
+ # This implicitly converts them to truthy values. There may be