From a8e869e786253f4c78cdb2fda1b10c3b12fc492a Mon Sep 17 00:00:00 2001 From: jasl Date: Sat, 15 Oct 2022 01:53:29 +0800 Subject: [PATCH] .S in sgx-api-lite not work on Intel-based macOS as well, so disable it on macOS --- crates/sgx-api-lite/src/sys.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/sgx-api-lite/src/sys.rs b/crates/sgx-api-lite/src/sys.rs index 26213e2ad5..8c6d3c717d 100644 --- a/crates/sgx-api-lite/src/sys.rs +++ b/crates/sgx-api-lite/src/sys.rs @@ -3824,10 +3824,10 @@ extern "C" { pub fn sgx_getkey(keyrequest: *mut sgx_key_request_t, key: *mut sgx_key_128bit_t) -> i64; } -#[cfg(target_arch = "x86_64")] +#[cfg(all(target_arch = "x86_64", not(target_os = "macos")))] core::arch::global_asm!(include_str!("enclave_api.S")); -#[cfg(not(target_arch = "x86_64"))] +#[cfg(any(not(target_arch = "x86_64"), target_os = "macos"))] const _: () = { #[no_mangle] extern "C" fn sgx_getkey(