unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob b6371dbb879723578468f7f38939bf3b14d43acf 1893 bytes (raw)
name: gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
 
SPDX-FileCopyrightText: © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
SPDX-License-Identifier: Apache-2.0

The Intel ITT API is a stub that doesn't provide functionality and requires a
closed source library in order to work.

This patch removes the need for the dependency and disables the vtune module.
Index: wasmtime-18.0.3/Cargo.toml
===================================================================
--- wasmtime-18.0.3.orig/Cargo.toml
+++ wasmtime-18.0.3/Cargo.toml
@@ -215,7 +215,6 @@ pooling-allocator = [
 profiling = [
     "dep:fxprof-processed-profile",
     "dep:wasmtime-jit-debug",
-    "dep:ittapi",
 ]
 runtime = [
     "dep:wasmtime-runtime",
@@ -227,10 +226,6 @@ wmemcheck = [
     "wasmtime-cranelift?/wmemcheck",
 ]
 
-[target."cfg(all(target_arch = \"x86_64\", not(target_os = \"android\")))".dependencies.ittapi]
-version = "0.4.0"
-optional = true
-
 [target."cfg(target_os = \"linux\")".dependencies.rustix]
 version = "0.38.21"
 features = ["thread"]
Index: wasmtime-18.0.3/src/profiling_agent.rs
===================================================================
--- wasmtime-18.0.3.orig/src/profiling_agent.rs
+++ wasmtime-18.0.3/src/profiling_agent.rs
@@ -31,8 +31,9 @@ cfg_if::cfg_if! {
     // Note: VTune support is disabled on windows mingw because the ittapi crate doesn't compile
     // there; see also https://github.com/bytecodealliance/wasmtime/pull/4003 for rationale.
     if #[cfg(all(feature = "profiling", target_arch = "x86_64", not(any(target_os = "android", all(target_os = "windows", target_env = "gnu")))))] {
-        mod vtune;
-        pub use vtune::new as new_vtune;
+        pub fn new_vtune() -> Result<Box<dyn ProfilingAgent>> {
+            bail!("VTune support disabled at compile time.");
+        }
     } else {
         pub fn new_vtune() -> Result<Box<dyn ProfilingAgent>> {
             if cfg!(feature = "vtune") {

debug log:

solving b6371dbb87 ...
found b6371dbb87 in https://yhetil.org/guix-patches/0627c13a59a7369a23f0d25db92411d6560e33e7.1712070308.git.jean@foundation.xyz/

applying [1/1] https://yhetil.org/guix-patches/0627c13a59a7369a23f0d25db92411d6560e33e7.1712070308.git.jean@foundation.xyz/
diff --git a/gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch b/gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch
new file mode 100644
index 0000000000..b6371dbb87

1:29: trailing whitespace.
 
Checking patch gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch...
Applied patch gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 b6371dbb879723578468f7f38939bf3b14d43acf	gnu/packages/patches/rust-wasmtime-18-remove-ittapi.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).