Skip to content

Commit 7ee31d9

Browse files
build: Update OpenSSL to 3.2.0 and fix build on WASI
This is a preparation for updating WASI SDK to 20.0
1 parent 06391d4 commit 7ee31d9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/ruby_wasm/build/product/openssl.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module RubyWasm
55
class OpenSSLProduct < AutoconfProduct
66
attr_reader :target
77

8-
OPENSSL_VERSION = "3.0.5"
8+
OPENSSL_VERSION = "3.2.0"
99

1010
def initialize(build_dir, target, toolchain)
1111
@build_dir = build_dir
@@ -41,21 +41,23 @@ def configure_args
4141
-no-sock
4242
-no-dgram
4343
--libdir=lib
44-
-DNO_SYSLOG
4544
-Wl,--allow-undefined
4645
]
4746
if @target == "wasm32-unknown-wasi"
4847
args.concat %w[
4948
-D_WASI_EMULATED_SIGNAL
5049
-D_WASI_EMULATED_PROCESS_CLOCKS
5150
-D_WASI_EMULATED_MMAN
51+
-D_WASI_EMULATED_GETPID
52+
-DNO_CHMOD
53+
-DHAVE_FORK=0
5254
]
5355
end
5456
args + tools_args
5557
end
5658

5759
def build(executor)
58-
return if Dir.exist?(install_root)
60+
return if File.exist?(File.join(install_root, "lib", "libssl.a"))
5961

6062
executor.mkdir_p File.dirname(product_build_dir)
6163
executor.rm_rf product_build_dir
@@ -79,7 +81,7 @@ def build(executor)
7981
# OpenSSL build system doesn't have well support for parallel build, so force -j1.
8082
executor.system "make",
8183
"-j1",
82-
"install_sw",
84+
"install_dev",
8385
"DESTDIR=#{destdir}",
8486
chdir: product_build_dir
8587
end

0 commit comments

Comments
 (0)