Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump lcp to v0.2.10 #8

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions e2e/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# cargo-machete v0.7.0 detects unused dependencies in lcp.
# Thus ignore linting for submodules until resolved the issue.
# ---
# Analyzing dependencies of crates in this directory...
# cargo-machete found the following unused dependencies in this directory:
# light-client -- ./e2e/lcp/modules/light-client/Cargo.toml:
# serde
lcp/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this. In cases where the ibc feature is not enabled, serde may not be necessary.

17 changes: 8 additions & 9 deletions e2e/Enclave.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
######## Import SGX SDK ########
include ImportRustSGXSDK.mk

######## SGX SDK Settings ########
SGX_SDK ?= /opt/sgxsdk
SGX_MODE ?= HW
Expand All @@ -9,7 +6,7 @@ SGX_DEBUG ?= 0
SGX_PRERELEASE ?= 0
SGX_PRODUCTION ?= 0

include rust-sgx-sdk/buildenv.mk
include buildenv.mk

ifeq ($(shell getconf LONG_BIT), 32)
SGX_ARCH := x86
Expand Down Expand Up @@ -52,7 +49,8 @@ endif

SGX_COMMON_CFLAGS += -fstack-protector

CARGO_FEATURES = --features=default
ENCLAVE_CARGO_FEATURES = --features=default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junichi-tanaka Can you also remove CARGO_FEATURES reference in enclave target?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bluele removed in 70106c3

APP_CARGO_FEATURES = --features=default
ifeq ($(SGX_PRODUCTION), 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like APP_CARGO_FEATURES is unused and not necessary. I think these changes (*_CARGO_FEATURES) are unnecessary.

SGX_ENCLAVE_MODE = "Production Mode"
SGX_ENCLAVE_CONFIG = $(SGX_ENCLAVE_CONFIG)
Expand All @@ -63,7 +61,8 @@ else
SGX_ENCLAVE_CONFIG = "enclave/Enclave.config.xml"
SGX_SIGN_KEY = "enclave/Enclave_private.pem"
ifneq ($(SGX_MODE), HW)
CARGO_FEATURES = --features=default,sgx-sw
ENCLAVE_CARGO_FEATURES = --features=default
APP_CARGO_FEATURES = --features=default,sgx-sw
endif
endif

Expand Down Expand Up @@ -93,7 +92,7 @@ ProtectedFs_Library_Name := sgx_tprotected_fs

RustEnclave_C_Files := $(wildcard ./enclave/*.c)
RustEnclave_C_Objects := $(RustEnclave_C_Files:.c=.o)
RustEnclave_Include_Paths := -I$(CUSTOM_COMMON_PATH)/inc -I$(CUSTOM_EDL_PATH) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include
RustEnclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/stlport -I$(SGX_SDK)/include/epid -I ./enclave -I./include

RustEnclave_Link_Libs := -L$(CUSTOM_LIBRARY_PATH) -lenclave
RustEnclave_Compile_Flags := $(SGX_COMMON_CFLAGS) $(ENCLAVE_CFLAGS) $(RustEnclave_Include_Paths)
Expand All @@ -110,7 +109,7 @@ Signed_RustEnclave_Name := bin/enclave.signed.so
######## EDL Objects ########

$(Enclave_EDL_Files): $(SGX_EDGER8R) enclave/Enclave.edl
$(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --search-path $(CUSTOM_EDL_PATH) --trusted-dir enclave
$(SGX_EDGER8R) --trusted enclave/Enclave.edl --search-path $(SGX_SDK)/include --trusted-dir enclave
@echo "GEN => $(Enclave_EDL_Files)"

######## Enclave Objects ########
Expand All @@ -130,6 +129,6 @@ $(Signed_RustEnclave_Name): $(RustEnclave_Name)

.PHONY: enclave
enclave:
@cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES)
cd enclave && RUSTFLAGS=$(RUSTFLAGS) cargo build $(CARGO_TARGET) $(CARGO_FEATURES)
@mkdir -p ./lib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it's my mistake. I'll revert it. 🙇🏼‍♂️

@cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a
23 changes: 0 additions & 23 deletions e2e/ImportRustSGXSDK.mk

This file was deleted.

File renamed without changes.
Loading
Loading