rb_sys 0.9.57 → 0.9.59
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rb_sys/cargo_builder/link_flag_converter.rb +2 -1
- data/lib/rb_sys/cargo_builder.rb +7 -3
- data/lib/rb_sys/mkmf.rb +6 -1
- data/lib/rb_sys/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0d0c1e0630a88954cda754dbb7db45842203cacd6fd265ea75a0424989d66e34
|
|
4
|
+
data.tar.gz: 94d12fe7fe913ffb00ac9343a3ab594e3701d82f99fda2ab99a79e654bd4259e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 618d433d7992df2fab66bdeb03204d0e699a4594881bc48bd61a4c5359b94eb25f26fd0eb9f2cd57038d4130c125383069267e125edc92d5761ef920ae3a6d87
|
|
7
|
+
data.tar.gz: 1d6aa9c2039dffc0093bed770be24703f88ec95164ad87d24913e1889e9697206a1ef461e405f57ef1b56e02f505b7dc86e36839d8df7a1f972aa8973b94b186
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -7,7 +7,8 @@ module RbSys
|
|
|
7
7
|
# Converts Ruby link flags into something cargo understands
|
|
8
8
|
class LinkFlagConverter
|
|
9
9
|
FILTERED_PATTERNS = [
|
|
10
|
-
/compress-debug-sections
|
|
10
|
+
/compress-debug-sections/, # Not supported by all linkers, and not required for Rust
|
|
11
|
+
/^\s*-s\s*$/
|
|
11
12
|
]
|
|
12
13
|
|
|
13
14
|
def self.convert(args)
|
data/lib/rb_sys/cargo_builder.rb
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
require "rubygems/ext"
|
|
2
|
+
require "rubygems/ext/builder"
|
|
1
3
|
require_relative "cargo_builder/link_flag_converter"
|
|
2
4
|
|
|
3
5
|
module RbSys
|
|
4
6
|
# A class to build a Ruby gem Cargo. Extracted from `rubygems` gem, with some modifications.
|
|
5
7
|
class CargoBuilder < Gem::Ext::Builder
|
|
6
|
-
attr_accessor :spec, :runner, :env, :features, :target, :extra_rustc_args, :dry_run, :ext_dir, :extra_rustflags
|
|
8
|
+
attr_accessor :spec, :runner, :env, :features, :target, :extra_rustc_args, :dry_run, :ext_dir, :extra_rustflags,
|
|
9
|
+
:extra_cargo_args
|
|
7
10
|
attr_writer :profile
|
|
8
11
|
|
|
9
12
|
def initialize(spec)
|
|
@@ -17,6 +20,7 @@ module RbSys
|
|
|
17
20
|
@features = []
|
|
18
21
|
@target = ENV["CARGO_BUILD_TARGET"] || ENV["RUST_TARGET"]
|
|
19
22
|
@extra_rustc_args = []
|
|
23
|
+
@extra_cargo_args = []
|
|
20
24
|
@dry_run = true
|
|
21
25
|
@ext_dir = nil
|
|
22
26
|
@extra_rustflags = []
|
|
@@ -68,7 +72,7 @@ module RbSys
|
|
|
68
72
|
cmd += Gem::Command.build_args
|
|
69
73
|
cmd += args
|
|
70
74
|
cmd += ["--"]
|
|
71
|
-
cmd += [*
|
|
75
|
+
cmd += [*rustc_args(dest_path)]
|
|
72
76
|
cmd += extra_rustc_args
|
|
73
77
|
cmd
|
|
74
78
|
end
|
|
@@ -105,7 +109,7 @@ module RbSys
|
|
|
105
109
|
result
|
|
106
110
|
end
|
|
107
111
|
|
|
108
|
-
def
|
|
112
|
+
def rustc_args(dest_dir)
|
|
109
113
|
[
|
|
110
114
|
*linker_args,
|
|
111
115
|
*mkmf_libpath,
|
data/lib/rb_sys/mkmf.rb
CHANGED
|
@@ -68,6 +68,7 @@ module RbSys
|
|
|
68
68
|
#{conditional_assign("RB_SYS_CARGO_FEATURES", builder.features.join(","))}
|
|
69
69
|
#{conditional_assign("RB_SYS_GLOBAL_RUSTFLAGS", GLOBAL_RUSTFLAGS.join(" "))}
|
|
70
70
|
#{conditional_assign("RB_SYS_EXTRA_RUSTFLAGS", builder.extra_rustflags.join(" "))}
|
|
71
|
+
#{conditional_assign("RB_SYS_EXTRA_CARGO_ARGS", builder.extra_cargo_args.join(" "))}
|
|
71
72
|
|
|
72
73
|
# Set dirname for the profile, since the profiles do not directly map to target dir (i.e. dev -> debug)
|
|
73
74
|
#{if_eq_stmt("$(RB_SYS_CARGO_PROFILE)", "dev")}
|
|
@@ -163,7 +164,11 @@ module RbSys
|
|
|
163
164
|
args = ARGV.dup
|
|
164
165
|
args.shift if args.first == "--"
|
|
165
166
|
cargo_cmd = builder.cargo_command(dest_path, args)
|
|
166
|
-
Shellwords.join(cargo_cmd)
|
|
167
|
+
cmd = Shellwords.join(cargo_cmd)
|
|
168
|
+
cmd.gsub!("\\=", "=")
|
|
169
|
+
cmd.gsub!(/\Acargo rustc/, "$(CARGO) rustc $(RB_SYS_EXTRA_CARGO_ARGS)")
|
|
170
|
+
cmd.gsub!(/-v=\d/, "")
|
|
171
|
+
cmd
|
|
167
172
|
end
|
|
168
173
|
|
|
169
174
|
def env_vars(builder)
|
data/lib/rb_sys/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.9.59
|
|
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: 2023-01
|
|
33
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
|
34
34
|
dependencies: []
|
|
35
35
|
description:
|
|
36
36
|
email:
|
metadata.gz.sig
CHANGED
|
Binary file
|