Skip to content

Commit

Permalink
Update core to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Jul 23, 2024
1 parent fc0e662 commit a38b771
Show file tree
Hide file tree
Showing 23 changed files with 1,208 additions and 957 deletions.
1 change: 1 addition & 0 deletions couchbase.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Gem::Specification.new do |spec|
"ext/*.cxx",
"ext/*.hxx",
"ext/*.hxx.in",
"ext/*.patch",
"ext/*.rb",
"ext/CMakeLists.txt",
"ext/cache/**/*",
Expand Down
40 changes: 40 additions & 0 deletions ext/0001-fix-build-for-mingw-w64-ucrt-x86_64-toolchain.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 6bdc93aac66f2282823dceee802b60e2447c4ba9 Mon Sep 17 00:00:00 2001
From: Sergey Avseyev <[email protected]>
Date: Fri, 20 Oct 2023 20:48:33 -0700
Subject: [PATCH] fix build for mingw-w64-ucrt-x86_64-toolchain

---
src/crypto/CMakeLists.txt | 4 ++++
src/crypto/curve25519/internal.h | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt
index 68fb65b30..f53a9eee9 100644
--- a/src/crypto/CMakeLists.txt
+++ b/src/crypto/CMakeLists.txt
@@ -335,6 +335,10 @@ if(WIN32)
target_link_libraries(crypto ws2_32)
endif()

+if(MINGW)
+ target_link_libraries(crypto --static-libgcc --static-libstdc++)
+endif()
+
if(NOT ANDROID)
find_package(Threads REQUIRED)
target_link_libraries(crypto Threads::Threads)
diff --git a/src/crypto/curve25519/internal.h b/src/crypto/curve25519/internal.h
index 0cd1a12aa..ab33badc0 100644
--- a/src/crypto/curve25519/internal.h
+++ b/src/crypto/curve25519/internal.h
@@ -32,7 +32,7 @@ void x25519_NEON(uint8_t out[32], const uint8_t scalar[32],
#endif

#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_SMALL) && \
- defined(__GNUC__) && defined(__x86_64__)
+ defined(__GNUC__) && defined(__x86_64__) && !defined(__MINGW32__)
#define BORINGSSL_FE25519_ADX

// fiat_curve25519_adx_mul is defined in
--
2.42.0.windows.2
2 changes: 1 addition & 1 deletion ext/couchbase
5 changes: 5 additions & 0 deletions ext/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ def sys(*cmd)
cmake_flags << "-DCMAKE_AR=#{ar}" if ar

project_path = File.expand_path(File.join(__dir__))

Dir.glob(File.join(project_path, "*.patch")).each do |path|
FileUtils.cp(path, File.join(project_path, "couchbase", "cmake"), verbose: true)
end

build_dir = ENV['CB_EXT_BUILD_DIR'] ||
File.join(Dir.tmpdir, "cb-#{build_type}-#{RUBY_VERSION}-#{RUBY_PATCHLEVEL}-#{RUBY_PLATFORM}-#{SDK_VERSION}")
FileUtils.rm_rf(build_dir, verbose: true) unless ENV['CB_PRESERVE_BUILD_DIR']
Expand Down
211 changes: 96 additions & 115 deletions ext/rcb_analytics.cxx

Large diffs are not rendered by default.

Loading

0 comments on commit a38b771

Please sign in to comment.