This is an automated email from the ASF dual-hosted git repository.

rduan pushed a commit to branch v1.1.4-testing
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave-sgx-sdk.git


The following commit(s) were added to refs/heads/v1.1.4-testing by this push:
     new 5f037b6  Fix switchless samplecode link error
5f037b6 is described below

commit 5f037b6458da44acd0569615385b24c1be5e6937
Author: volcano <[email protected]>
AuthorDate: Thu Oct 14 19:41:20 2021 +0800

    Fix switchless samplecode link error
---
 samplecode/switchless/app/build.rs    | 1 +
 samplecode/switchless/app/src/main.rs | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/samplecode/switchless/app/build.rs 
b/samplecode/switchless/app/build.rs
index 65a322e..fd8807d 100644
--- a/samplecode/switchless/app/build.rs
+++ b/samplecode/switchless/app/build.rs
@@ -28,6 +28,7 @@ fn main () {
     println!("cargo:rustc-link-lib=static=Enclave_u");
 
     println!("cargo:rustc-link-search=native={}/lib64", sdk_dir);
+    println!("cargo:rustc-link-lib=static=sgx_uswitchless");
     match is_sim.as_ref() {
         "SW" => println!("cargo:rustc-link-lib=dylib=sgx_urts_sim"),
         "HW" => println!("cargo:rustc-link-lib=dylib=sgx_urts"),
diff --git a/samplecode/switchless/app/src/main.rs 
b/samplecode/switchless/app/src/main.rs
index 8876218..4ccb4c1 100644
--- a/samplecode/switchless/app/src/main.rs
+++ b/samplecode/switchless/app/src/main.rs
@@ -15,9 +15,7 @@
 // specific language governing permissions and limitations
 // under the License..
 
-#![feature(link_args)]
 #![allow(unused_attributes)]
-#![link_args = "-Wl,--whole-archive -lsgx_uswitchless -Wl,--no-whole-archive"]
 
 extern crate sgx_types;
 extern crate sgx_urts;

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to