Skip to content

Commit 0207b80

Browse files
committed
add signal feature to sgx-urts
Signed-off-by: Jun Kimura <[email protected]>
1 parent 2ef5686 commit 0207b80

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ enclave-test:
4242
untrusted-test:
4343
@echo "Running untrusted crate tests..."
4444
@echo "Testing sgx-types..."
45-
@cd sgx-types && cargo test --features urts
45+
@cargo +stable test --manifest-path sgx-types/Cargo.toml --features urts
4646
@echo "Testing sgx-urts..."
47-
@cd sgx-urts && cargo test --features simulate_utils
47+
@cargo +stable test --manifest-path sgx-urts/Cargo.toml --no-default-features --features simulate_utils
4848
@echo "Testing sgx-build..."
49-
@cd sgx-build && cargo test
49+
@cargo +stable test --manifest-path sgx-build/Cargo.toml
5050
@echo "Testing cargo-sgx..."
51-
@cd cargo-sgx && cargo test
51+
@cargo +stable test --manifest-path cargo-sgx/Cargo.toml
5252

5353
.PHONY: toml-fmt
5454
toml-fmt:

sgx-urts/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ name = "sgx_urts"
1212
crate-type = ["rlib"]
1313

1414
[features]
15-
default = []
15+
default = ["signal"]
1616
global_init = ["global_exit"]
1717
global_exit = ["global_init"]
1818
simulate_utils = ["tracing", "object", "iced-x86"]
19+
signal = []
1920

2021
[dependencies]
2122
sgx-types = { path = "../sgx-types", default-features = false, features = ["urts"] }

sgx-urts/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License..
1717

18-
#![feature(linkage)]
18+
#![cfg_attr(feature = "signal", feature(linkage))]
1919
#![allow(clippy::not_unsafe_ptr_arg_deref)]
2020

2121
pub mod asyncio;
@@ -27,6 +27,7 @@ pub mod mem;
2727
pub mod net;
2828
pub mod pipe;
2929
pub mod process;
30+
#[cfg(feature = "signal")]
3031
pub mod signal;
3132
#[cfg(feature = "simulate_utils")]
3233
pub mod simulate;

0 commit comments

Comments
 (0)