Skip to content

Commit

Permalink
Merge pull request #8 from junichi-tanaka/bump-lcp-to-v0.2.10
Browse files Browse the repository at this point in the history
Bump lcp to v0.2.10

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele authored Oct 2, 2024
2 parents 9e22c23 + 70106c3 commit 394650b
Show file tree
Hide file tree
Showing 99 changed files with 278 additions and 6,217 deletions.
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/
18 changes: 4 additions & 14 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,27 +49,20 @@ endif

SGX_COMMON_CFLAGS += -fstack-protector

CARGO_FEATURES = --features=default
ifeq ($(SGX_PRODUCTION), 1)
SGX_ENCLAVE_MODE = "Production Mode"
SGX_ENCLAVE_CONFIG = $(SGX_ENCLAVE_CONFIG)
SGX_SIGN_KEY = $(SGX_COMMERCIAL_KEY)
CARGO_FEATURES = --features=production
else
SGX_ENCLAVE_MODE = "Development Mode"
SGX_ENCLAVE_CONFIG = "enclave/Enclave.config.xml"
SGX_SIGN_KEY = "enclave/Enclave_private.pem"
ifneq ($(SGX_MODE), HW)
CARGO_FEATURES = --features=default,sgx-sw
endif
endif

######## CUSTOM Settings ########

CUSTOM_LIBRARY_PATH := ./lib
CUSTOM_BIN_PATH := ./bin
CUSTOM_EDL_PATH := ./rust-sgx-sdk/edl
CUSTOM_COMMON_PATH := ./rust-sgx-sdk/common

######## EDL Settings ########

Expand All @@ -93,7 +83,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 +100,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 +120,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)
@mkdir -p ./lib
@cp enclave/target/$(OUTPUT_PATH)/libproxy_enclave.a ./lib/libenclave.a
23 changes: 0 additions & 23 deletions e2e/ImportRustSGXSDK.mk

This file was deleted.

4 changes: 0 additions & 4 deletions e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ all: $(Signed_RustEnclave_Name)
fmt:
@cargo fmt --all && cd ./enclave && cargo fmt --all

.PHONY: docker
docker:
@cd rust-sgx-sdk/dockerfile && docker build --no-cache -t datachainlab/sgx-rust:2004-1.1.5 -f Dockerfile.2004.nightly .

.PHONY: yrly
yrly:
cd ./relayer && go build -o ../bin/yrly -tags customcert .
Expand Down
File renamed without changes.
Loading

0 comments on commit 394650b

Please sign in to comment.