Skip to content

Commit 5654465

Browse files
committed
Disable the tracy example for musl
Signed-off-by: James Sturtevant <[email protected]>
1 parent 27e7076 commit 5654465

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/hyperlight_host/Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ criterion = "0.7.0"
106106
tracing-chrome = "0.7.2"
107107
metrics-util = "0.20.0"
108108
metrics-exporter-prometheus = { version = "0.17.2", default-features = false }
109-
tracing-tracy = "0.11.4"
110109
serde_json = "1.0"
111110
hyperlight-component-macro = { workspace = true }
112111

@@ -118,6 +117,11 @@ windows = { version = "0.62", features = [
118117
[target.'cfg(unix)'.dev-dependencies]
119118
proc-maps = "0.4.0"
120119

120+
# tracy doesn't play well with musl (it does work in cross)
121+
[target.'cfg(not(target_env = "musl"))'.dev-dependencies]
122+
tracing-tracy = "0.11.4"
123+
124+
121125
[build-dependencies]
122126
anyhow = { version = "1.0.99" }
123127
cfg_aliases = "0.2.1"

src/hyperlight_host/examples/tracing-tracy/main.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,28 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16+
1617
#![allow(clippy::disallowed_macros)]
18+
#[cfg(not(target_env = "musl"))]
1719
use hyperlight_host::sandbox::uninitialized::UninitializedSandbox;
20+
#[cfg(not(target_env = "musl"))]
1821
use hyperlight_host::{GuestBinary, Result};
22+
#[cfg(not(target_env = "musl"))]
1923
use hyperlight_testing::simple_guest_as_string;
24+
#[cfg(not(target_env = "musl"))]
2025
use tracing_subscriber::EnvFilter;
26+
#[cfg(not(target_env = "musl"))]
2127
use tracing_subscriber::layer::SubscriberExt;
2228

29+
#[cfg(target_env = "musl")]
30+
fn main() {
31+
println!("Tracy example isn't tested run on musl");
32+
}
2333
// An example of how to get tracy tracing working with hyperlight.
2434
// Run with:
2535
// TRACY_NO_EXIT=1 RUST_LOG=trace cargo run --package hyperlight-host --example tracing-tracy --profile release-with-debug,
2636
// and then open the `tracy-profiler` GUI, and there should be an option to load the client created by this example.
37+
#[cfg(not(target_env = "musl"))]
2738
fn main() -> Result<()> {
2839
tracing::subscriber::set_global_default(
2940
tracing_subscriber::registry()

0 commit comments

Comments
 (0)