File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change
1
+ _Init_zstdruby
Original file line number Diff line number Diff line change 2
2
3
3
have_func ( 'rb_gc_mark_movable' )
4
4
5
- $CFLAGS = '-I. -O3 -std=c99 -DZSTD_STATIC_LINKING_ONLY -DZSTD_MULTITHREAD -pthread -DDEBUGLEVEL=0'
5
+ $CFLAGS = '-I. -O3 -std=c99 -DZSTD_STATIC_LINKING_ONLY -DZSTD_MULTITHREAD -pthread -DDEBUGLEVEL=0 -fvisibility=hidden -DZSTDLIB_VISIBLE=\'__attribute__((visibility("hidden")))\' -DZSTDLIB_HIDDEN=\'__attribute__((visibility("hidden")))\' '
6
6
$CPPFLAGS += " -fdeclspec" if CONFIG [ 'CXX' ] =~ /clang/
7
7
8
+ # macOS specific: Use exported_symbols_list to control symbol visibility
9
+ if RUBY_PLATFORM =~ /darwin/
10
+ $LDFLAGS += " -exported_symbols_list #{ File . expand_path ( 'exports.txt' , __dir__ ) } "
11
+ end
12
+
8
13
Dir . chdir File . expand_path ( '..' , __FILE__ ) do
9
14
$srcs = Dir [ '**/*.c' , '**/*.S' ]
10
15
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ void zstd_ruby_skippable_frame_init(void);
8
8
void zstd_ruby_streaming_compress_init (void );
9
9
void zstd_ruby_streaming_decompress_init (void );
10
10
11
- void
11
+ RUBY_FUNC_EXPORTED void
12
12
Init_zstdruby (void )
13
13
{
14
14
#ifdef HAVE_RB_EXT_RACTOR_SAFE
You can’t perform that action at this time.
0 commit comments