mesatee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ms...@apache.org
Subject [incubator-mesatee] branch master updated: [third-party] Ensure all crates usages are from vendor dir (#107)
Date Wed, 27 Nov 2019 06:47:57 GMT
This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mesatee.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c9fe86  [third-party] Ensure all crates usages are from vendor dir (#107)
5c9fe86 is described below

commit 5c9fe86e10b04ff707bd396a06bb2d2f86a2dedd
Author: Mingshen Sun <bob@mssun.me>
AuthorDate: Tue Nov 26 22:47:48 2019 -0800

    [third-party] Ensure all crates usages are from vendor dir (#107)
    
    * Update crates-sgx to vendor gbdt
    * Fix rand updating
    * Add an offline option to cmake set on as defult value
---
 CMakeLists.txt                                  | 5 ++++-
 cmake/MesaTEEGenVars.cmake                      | 4 ++++
 cmake/MesaTEEUtils.cmake                        | 4 ++--
 cmake/tomls/Cargo.sgx_trusted_lib.toml          | 3 ++-
 examples/gbdt/Cargo.toml                        | 1 -
 mesatee_services/fns/sgx_trusted_lib/Cargo.toml | 4 ++--
 third_party/crates-sgx                          | 2 +-
 7 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 565d2c6..ae71b33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,8 @@ SET_STRVAR_FROM_ENV_OR(SGX_MODE "HW" "Mode of SGX, HW or SW")
 SET_STRVAR_FROM_ENV_OR(RUSTFLAGS "" "Rust flags")
 SET_STRVAR_FROM_ENV_OR(MESATEE_CMAKE_DBG "" "set to turn on debug message for cmake")
 set(MESAPY_VERSION 2b7ea38773d337d106c613a239661a60a4fa7528)
-option(COV OFF "Turn on coverage or not")
+option(COV "Turn on/off coverage" OFF)
+option(OFFLINE "Turn on/off cargo offline" ON)
 # ======= VARIABLES FOR CMAKE -D{VAR}=VAL CONFIGURATION END =======
 
 # =============== VARIABLES FOR MANUAL CHANGE BEGIN ===============
@@ -57,6 +58,7 @@ foreach(_i RANGE ${UNIX_APP_LAST_INDEX})
         TOML_DIR ${MT_UNIX_TOML_DIR}
         TARGET_DIR ${UNIX_TARGET_DIR}
         INSTALL_DIR ${MESATEE_INSTALL_DIR}/${_category}
+        EXTRA_CARGO_FLAGS ${EXTRA_CARGO_FLAGS}
         DEPENDS prep ${TARGET_CONFIG_GEN}
     )
 endforeach()
@@ -72,6 +74,7 @@ foreach(_i RANGE ${SGX_APP_LAST_INDEX})
         TOML_DIR ${MT_SGXAPP_TOML_DIR}
         TARGET_DIR ${UNTRUSTED_TARGET_DIR}
         INSTALL_DIR ${MESATEE_INSTALL_DIR}/${_category}
+        EXTRA_CARGO_FLAGS ${EXTRA_CARGO_FLAGS}
         DEPENDS prep ${TARGET_CONFIG_GEN}
     )
 endforeach()
diff --git a/cmake/MesaTEEGenVars.cmake b/cmake/MesaTEEGenVars.cmake
index ec367fd..9687680 100644
--- a/cmake/MesaTEEGenVars.cmake
+++ b/cmake/MesaTEEGenVars.cmake
@@ -67,6 +67,10 @@ else()
     set(CARGO_BUILD_FLAGS --release)
 endif()
 
+if (OFFLINE)
+  set(EXTRA_CARGO_FLAGS "--offline")
+endif()
+
 execute_process (
     COMMAND bash -c "cat ${PROJECT_SOURCE_DIR}/third_party/rust-sgx-sdk/rust-toolchain"
     OUTPUT_VARIABLE RUSTUP_TOOLCHAIN
diff --git a/cmake/MesaTEEUtils.cmake b/cmake/MesaTEEUtils.cmake
index 36e61a2..2fbcf75 100644
--- a/cmake/MesaTEEUtils.cmake
+++ b/cmake/MesaTEEUtils.cmake
@@ -38,8 +38,8 @@ endmacro()
 # )
 function(add_cargo_build_target package_name)
     set(options NOT_SET_COMMON_ENV)
-    set(oneValueArgs TARGET_NAME TOML_DIR TARGET_DIR INSTALL_DIR)
-    set(multiValueArgs DEPENDS EXTRA_CARGO_FLAGS)
+    set(oneValueArgs TARGET_NAME TOML_DIR TARGET_DIR INSTALL_DIR EXTRA_CARGO_FLAGS)
+    set(multiValueArgs DEPENDS)
     cmake_parse_arguments(MTEE "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})
 
diff --git a/cmake/tomls/Cargo.sgx_trusted_lib.toml b/cmake/tomls/Cargo.sgx_trusted_lib.toml
index f53d6db..3022578 100644
--- a/cmake/tomls/Cargo.sgx_trusted_lib.toml
+++ b/cmake/tomls/Cargo.sgx_trusted_lib.toml
@@ -56,7 +56,7 @@ chrono            = { git = "https://github.com/mesalock-linux/chrono-sgx"
}
 crc32fast         = { git = "https://github.com/mesalock-linux/rust-crc32fast-sgx" }
 color_quant       = { git = "https://github.com/mesalock-linux/color_quant-sgx" }
 deflate           = { git = "https://github.com/mesalock-linux/deflate-rs-sgx", branch =
"dev" }
-gbdt              = { git = "https://github.com/mesalock-linux/gbdt-rs", package = "gbdt_sgx"
}
+gbdt              = { git = "https://github.com/mesalock-linux/gbdt-rs", branch = "mesatee-sgx"
}
 getrandom         = { git = "https://github.com/mesalock-linux/getrandom-sgx" }
 gif               = { git = "https://github.com/mesalock-linux/image-gif-sgx" }
 image             = { git = "https://github.com/mesalock-linux/image-sgx" }
@@ -71,6 +71,7 @@ parity-wasm       = { git = "https://github.com/mesalock-linux/parity-wasm-sgx"
 png               = { git = "https://github.com/mesalock-linux/image-png-sgx" }
 profiler_builtins = { git = "https://github.com/mesalock-linux/sgx-fake-profiler-builtins"
}
 quick-error       = { git = "https://github.com/mesalock-linux/quick-error-sgx" }
+rand              = { git = "https://github.com/mesalock-linux/rand-sgx", tag = "v0.6.5_sgx1.0.9"
}
 regex             = { git = "https://github.com/mesalock-linux/regex-sgx" }
 ring              = { git = "https://github.com/mesalock-linux/ring-sgx", tag = "v0.16.5"
}
 rustls            = { git = "https://github.com/mesalock-linux/rustls", branch = "mesalock_sgx"
}
diff --git a/examples/gbdt/Cargo.toml b/examples/gbdt/Cargo.toml
index 6273d1f..b457557 100644
--- a/examples/gbdt/Cargo.toml
+++ b/examples/gbdt/Cargo.toml
@@ -12,4 +12,3 @@ lazy_static = "1.1.0"
 serde_derive = { version = "1.0.92" }
 serde_json = { version = "1.0.39" }
 serde = { version = "1.0.92" }
-gbdt_sgx = { git = "https://github.com/mesalock-linux/gbdt-rs" }
\ No newline at end of file
diff --git a/mesatee_services/fns/sgx_trusted_lib/Cargo.toml b/mesatee_services/fns/sgx_trusted_lib/Cargo.toml
index 20cd82c..1d8c555 100644
--- a/mesatee_services/fns/sgx_trusted_lib/Cargo.toml
+++ b/mesatee_services/fns/sgx_trusted_lib/Cargo.toml
@@ -41,5 +41,5 @@ tdfs_internal_client = { path = "../../tdfs/internal/client", optional =
true }
 sgx_cov              = { version = "0.1.0", optional = true }
 sgx_tstd             = { version = "1.0.9", features = ["net", "backtrace"], optional = true
}
 sgx_types            = { version = "1.0.9" }
-gbdt                 = { git = "https://github.com/mesalock-linux/gbdt-rs", package = "gbdt_sgx",
features = ["input", "enable_training"] }
-rusty-machine =  { version = "0.5.4" }
+gbdt                 = { version = "0.1.0", features = ["input", "enable_training"] }
+rusty-machine        = { version = "0.5.4" }
diff --git a/third_party/crates-sgx b/third_party/crates-sgx
index 0aceb96..0f04359 160000
--- a/third_party/crates-sgx
+++ b/third_party/crates-sgx
@@ -1 +1 @@
-Subproject commit 0aceb963260c6cd29f218eb6da86edb7c872123d
+Subproject commit 0f04359f4f845a07fe8659238b5f0a8b4cad9884


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@mesatee.apache.org
For additional commands, e-mail: commits-help@mesatee.apache.org


Mime
View raw message