rb_sys 0.9.36 → 0.9.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 597f75a81d483edd85cc5bf1a09be027d4b612dff53ed6f2ecb1818230aaa1ff
4
- data.tar.gz: 7c4a90b0a9f13a310c30b3e5366949e8d4d50cc9b44c05e005d65b39b24fa7ee
3
+ metadata.gz: 48d0c6470452d832b1a10ac1aa49228a2185a36de7c551a6e97dd2f04490dfeb
4
+ data.tar.gz: 1d97ff8351afaff9adad083b07647f5ee6964329b7b224b99ec99640d5908f57
5
5
  SHA512:
6
- metadata.gz: a31f920df196e7c39fc232ee27c437f5fcbaff163675f57a931761ec1f6ee8f2c8c9659e346a3b6b7559a2ce263d0ebe2b8fd5a00fd5667aeab9d0e21aaf97a5
7
- data.tar.gz: d00f112746b3b056c98a1480e7c172c6b0a877042f7430a549bfa9d2114057a9bb6e90294385b5af6684358893715412ebeb7a4aa3d1ef970e7e4cf939ec7bc6
6
+ metadata.gz: b2da23aee398cb88673aa7d392999f054a6b76d307e9a564d41f3fd7ab86b5fe7e71ec69e91875a7c1aa09b7e358383c36affd52e722cdb79a1e5529eca66a89
7
+ data.tar.gz: 94d67086625a8e8fd4f99f987b050f547ad4f540995cf77624593a48c7344664c3cc5200c3fe6ed145ee684e4e863f1bdeb552a82a14af0fc11f4be701a7b109
checksums.yaml.gz.sig CHANGED
@@ -1 +1 @@
1
- LQϙ�W�ɜ��jr匥��@��Aex�!l K./o' %���KT���O��ˌ�� �ۼ���^o�]遨̓�C�މdޅ�C��6���a�����l^���5SC���m2Ki���n �N=a�#$���wif�Ӱ-��،�x��?����=0��F��6<)���PG_����U.=��Z��۱�bv\���k025Ԫ�fV,�BL�h���Sa��$���a|ƹ�m=h������\.Tm
1
+ g���3#5�㾭$q��v:�egE�BЗ��I���������1ľ}�SB{>��|��@�@0��dHR[Ɖ��[�#cgT�C(�l��:��9]�����[��Q'Α��SZ_��0;��v���5��(1֣�qfK�h�":�8�n��Q���||H7v^ -�O��g��ޗ��ap��r�Hp5f����)X��yr
data/lib/rb_sys/mkmf.rb CHANGED
@@ -10,6 +10,8 @@ require_relative "mkmf/config"
10
10
  module RbSys
11
11
  # Helper class for creating Rust Makefiles
12
12
  module Mkmf
13
+ GLOBAL_RUSTFLAGS = ["--cfg=rb_sys_gem"]
14
+
13
15
  # Helper for building Rust extensions by creating a Ruby compatible makefile
14
16
  # for Rust. By using this class, your rust extension will be 100% compatible
15
17
  # with the rake-compiler gem, which allows for easy cross compilation.
@@ -62,6 +64,7 @@ module RbSys
62
64
 
63
65
  #{conditional_assign("RB_SYS_CARGO_PROFILE", builder.profile)}
64
66
  #{conditional_assign("RB_SYS_CARGO_FEATURES", builder.features.join(","))}
67
+ #{conditional_assign("RB_SYS_GLOBAL_RUSTFLAGS", GLOBAL_RUSTFLAGS.join(" "))}
65
68
  #{conditional_assign("RB_SYS_EXTRA_RUSTFLAGS", builder.extra_rustflags.join(" "))}
66
69
 
67
70
  # Set dirname for the profile, since the profiles do not directly map to target dir (i.e. dev -> debug)
@@ -105,7 +108,7 @@ module RbSys
105
108
  #{endif_stmt}
106
109
 
107
110
  #{env_vars(builder)}
108
- #{export_env("RUSTFLAGS", "$(RUSTFLAGS) $(RB_SYS_EXTRA_RUSTFLAGS)")}
111
+ #{export_env("RUSTFLAGS", "$(RB_SYS_GLOBAL_RUSTFLAGS) $(RB_SYS_EXTRA_RUSTFLAGS) $(RUSTFLAGS)")}
109
112
 
110
113
  FORCE: ;
111
114
 
@@ -113,13 +116,11 @@ module RbSys
113
116
  \t$(ECHO) creating target directory \\($(@)\\)
114
117
  \t$(Q) $(MAKEDIRS) $(TARGET_DIR)
115
118
 
116
- $(DEFFILE): $(TARGET_DIR)
117
- \t$(ECHO) generating $(@)
118
- \t$(Q) ($(COPY) $(srcdir)/$(TARGET).def $@ 2> /dev/null) || (echo EXPORTS && echo $(TARGET_ENTRY)) > $@
119
+ #{deffile_definition}
119
120
 
120
121
  #{optional_rust_toolchain(builder)}
121
122
 
122
- $(RUSTLIB): $(DEFFILE) FORCE
123
+ $(RUSTLIB): #{deffile_definition ? "$(DEFFILE) " : nil}FORCE
123
124
  \t$(ECHO) generating $(@) \\("$(RB_SYS_CARGO_PROFILE)"\\)
124
125
  \t$(Q) #{full_cargo_command}
125
126
 
@@ -185,6 +186,18 @@ module RbSys
185
186
  cargo_command
186
187
  end
187
188
 
189
+ def deffile_definition
190
+ warn("EXPORT_PREFIX is not defined, please require \"mkmf\" before requiring \"rb_sys/mkmf\"") unless defined?(EXPORT_PREFIX)
191
+
192
+ return unless defined?(EXPORT_PREFIX) && EXPORT_PREFIX
193
+
194
+ @deffile_definition ||= <<~MAKE
195
+ $(DEFFILE): $(TARGET_DIR)
196
+ \t$(ECHO) generating $(@)
197
+ \t$(Q) ($(COPY) $(srcdir)/$(TARGET).def $@ 2> /dev/null) || (echo EXPORTS && echo $(TARGET_ENTRY)) > $@
198
+ MAKE
199
+ end
200
+
188
201
  def optional_rust_toolchain(builder)
189
202
  <<~MAKE
190
203
  #{conditional_assign("RB_SYS_FORCE_INSTALL_RUST_TOOLCHAIN", builder.force_install_rust_toolchain)}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbSys
4
- VERSION = "0.9.36"
4
+ VERSION = "0.9.37"
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_sys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.36
4
+ version: 0.9.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -30,7 +30,7 @@ cert_chain:
30
30
  Rl+ASkq2/1i07TkBpCf+2hq66+h/hx+/Y/KrUzXfe0jtvil0WESkJT2kqRqHWNhD
31
31
  9GKBxaQlXokNDtWCm1/gl6cD8WRZ0N5S4ZGJT1FLLsA=
32
32
  -----END CERTIFICATE-----
33
- date: 2022-11-05 00:00:00.000000000 Z
33
+ date: 2022-11-07 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description:
36
36
  email:
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.3.7
75
+ rubygems_version: 3.4.0.dev
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Helpers for compiling Rust extensions for ruby
metadata.gz.sig CHANGED
Binary file