Skip to content

Commit d70945f

Browse files
committed
[π˜€π—½π—Ώ] changes introduced through rebase
Created using spr 1.3.6-beta.1 [skip ci]
1 parent d4b8090 commit d70945f

File tree

27 files changed

+6
-185
lines changed

27 files changed

+6
-185
lines changed

β€Žcommon-build.rs

-27
This file was deleted.

β€Žprobe-test-attr/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
19-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
20-
2118
use serde::Serialize;
2219

2320
/// By deriving the `serde::Serialize` trait, the `Arg` struct can be used as an argument to a

β€Žprobe-test-build/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=test.d");
3121
Builder::new("test.d").build().unwrap();
3222
}

β€Žprobe-test-build/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
use std::thread::sleep;
2118
use std::time::Duration;
2219

β€Žprobe-test-macro/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
use std::thread::sleep;
2118
use std::time::Duration;
2219

β€Žtests/argument-types/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
19-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
2018
use serde::Serialize;
2119

2220
/// Most struct or tuple types implementing serde::Serialize may be used in probes.

β€Žtests/does-it-work/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=test.d");
3121
Builder::new("test.d").build().unwrap();
3222
}

β€Žtests/does-it-work/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// See the License for the specific language governing permissions and
1717
// limitations under the License.
1818

19-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
20-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
2119
#![allow(non_snake_case)]
2220

2321
use usdt::register_probes;

β€Žtests/empty/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=provider.d");
3121
Builder::new("provider.d")
3222
.build()

β€Žtests/empty/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
16-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
1715
#![deny(warnings)]
1816

1917
use usdt::register_probes;

β€Žtests/fake-cmd/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
16-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
1715
#![deny(warnings)]
1816

1917
fn main() {

β€Žtests/fake-lib/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=test.d");
3121
Builder::new("test.d").build().unwrap();
3222
}

β€Žtests/fake-lib/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
16-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
1715
#![deny(warnings)]
1816

1917
pub use usdt::register_probes;

β€Žtests/modules/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
16-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
17-
1815
mod inner;
1916

2017
fn main() {

β€Žtests/rename-builder/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=test.d");
3121
Builder::new("test.d").module("still_test").build().unwrap();
3222
}

β€Žtests/rename-builder/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
// See the License for the specific language governing permissions and
1616
// limitations under the License.
1717

18-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
19-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
2018
include!(concat!(env!("OUT_DIR"), "/test.rs"));
2119

2220
fn main() {

β€Žtests/rename/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
#[usdt::provider(provider = "something", probe_format = "probe_{probe}")]
2118
mod probes {
2219
fn something() {}

β€Žtests/test-json/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
use serde::{Serialize, Serializer};
2118

2219
// Expected error message from serialization failure

β€Žtests/test-unique-id/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
#[usdt::provider]
2118
mod with_ids {
2219
use usdt::UniqueId;

β€Žtests/usize/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
#[usdt::provider]
2118
mod usize__test {
2219
fn emit_usize(_: usize) {}

β€Žtests/zero-arg-probe/build.rs

-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,6 @@ use usdt::Builder;
1717
fn main() {
1818
println!("cargo:rerun-if-changed=build.rs");
1919

20-
if !version_check::is_min_version("1.59").unwrap_or(false) {
21-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
22-
}
23-
#[cfg(target_os = "macos")]
24-
if version_check::supports_feature("asm_sym").unwrap_or(false)
25-
&& !version_check::is_min_version("1.67").unwrap_or(false)
26-
{
27-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
28-
}
29-
3020
println!("cargo:rerun-if-changed=test.d");
3121
Builder::new("test.d").build().unwrap();
3222
}

β€Žtests/zero-arg-probe/src/main.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
16-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
1715
#![deny(warnings)]
1816

1917
use usdt::register_probes;

β€Žusdt-impl/build.rs

+3-48
Original file line numberDiff line numberDiff line change
@@ -28,57 +28,12 @@ enum Backend {
2828
fn main() {
2929
println!("cargo:rerun-if-changed=build.rs");
3030

31-
// `asm` feature was stabilized in 1.59
32-
let have_stable_asm = version_check::is_min_version("1.59").unwrap_or(false);
33-
// `asm_sym` feature was stabilized in 1.66
34-
let have_stable_asm_sym = version_check::is_min_version("1.66").unwrap_or(false);
35-
36-
// Are we being built with a compiler which allows feature flags (nightly)
37-
let is_nightly = version_check::is_feature_flaggable().unwrap_or(false);
38-
39-
let feat_asm = env::var_os("CARGO_FEATURE_ASM").is_some();
40-
let feat_strict_asm = env::var_os("CARGO_FEATURE_STRICT_ASM").is_some();
41-
4231
let backend = match env::var("CARGO_CFG_TARGET_OS").ok().as_deref() {
43-
Some("macos") if feat_asm => {
44-
if have_stable_asm && have_stable_asm_sym {
45-
Backend::Linker
46-
} else if feat_strict_asm || is_nightly {
47-
if !have_stable_asm {
48-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
49-
}
50-
if !have_stable_asm_sym {
51-
println!("cargo:rustc-cfg=usdt_need_feat_asm_sym");
52-
}
53-
Backend::Linker
54-
} else {
55-
Backend::NoOp
56-
}
57-
}
58-
Some("illumos") | Some("solaris") if feat_asm => {
59-
if have_stable_asm {
60-
Backend::Standard
61-
} else if feat_strict_asm || is_nightly {
62-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
63-
Backend::Standard
64-
} else {
65-
Backend::NoOp
66-
}
67-
}
68-
_ => {
69-
if !have_stable_asm {
70-
println!("cargo:rustc-cfg=usdt_need_feat_asm");
71-
}
72-
Backend::NoOp
73-
}
32+
Some("macos") => Backend::Linker,
33+
Some("illumos") | Some("solaris") => Backend::Standard,
34+
_ => Backend::NoOp,
7435
};
7536

76-
// Since visibility of the `asm!()` macro differs between the nightly feature and the
77-
// stabilized version, the consumer requires information about its availability
78-
if have_stable_asm {
79-
println!("cargo:rustc-cfg=usdt_stable_asm");
80-
}
81-
8237
match backend {
8338
Backend::NoOp => {
8439
println!("cargo:rustc-cfg=usdt_backend_noop");

β€Žusdt-impl/src/lib.rs

-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
// See the License for the specific language governing permissions and
1515
// limitations under the License.
1616

17-
#![cfg_attr(usdt_need_feat_asm, feature(asm))]
18-
#![cfg_attr(usdt_need_feat_asm_sym, feature(asm_sym))]
19-
2017
use serde::Deserialize;
2118
use std::cell::RefCell;
2219
use thiserror::Error;

β€Žusdt-impl/src/linker.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,7 @@ fn compile_probe(
179179
#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))]
180180
compile_error!("USDT only supports x86_64 and AArch64 architectures");
181181

182-
#[cfg(usdt_stable_asm)]
183-
let asm_macro = quote! { std::arch::asm };
184-
#[cfg(not(usdt_stable_asm))]
185-
let asm_macro = quote! { asm };
182+
let asm_macro = quote! { ::std::arch::asm };
186183

187184
let impl_block = quote! {
188185
extern "C" {

β€Žusdt-impl/src/no-linker.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ fn compile_probe(
8282
let (unpacked_args, in_regs) = common::construct_probe_args(&probe.types);
8383
let is_enabled_rec = emit_probe_record(&provider.name, &probe.name, None);
8484
let probe_rec = emit_probe_record(&provider.name, &probe.name, Some(&probe.types));
85-
#[cfg(usdt_stable_asm)]
86-
let asm_macro = quote! { std::arch::asm };
87-
#[cfg(not(usdt_stable_asm))]
88-
let asm_macro = quote! { asm };
85+
let asm_macro = quote! { ::std::arch::asm };
8986

9087
let impl_block = quote! {
9188
{

β€Žusdt/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55
license = "Apache-2.0"
66
description = "Dust your Rust with USDT probes"
77
repository = "https://github.com/oxidecomputer/usdt.git"
8-
rust-version = "1.63.0"
8+
rust-version = "1.75.0"
99

1010
# NOTE: The use of path and version dependencies is deliberate and load-bearing.
1111
#

0 commit comments

Comments
Β (0)