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

yuanz pushed a commit to branch no-std
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git

commit 592961de1249481f94f22c789344f032ccf52875
Author: Sumit Garg <[email protected]>
AuthorDate: Fri Dec 29 18:43:08 2023 +0530

    optee-utee: Use standard TA_DEV_KIT_DIR
    
    Similar to C counterparts, use TA_DEV_KIT_DIR as a standard path to
    export pre-built TA libraries and headers.
    
    Signed-off-by: Sumit Garg <[email protected]>
---
 optee-utee/optee-utee-sys/build.rs | 8 +++-----
 optee-utee/systest/build.rs        | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/optee-utee/optee-utee-sys/build.rs 
b/optee-utee/optee-utee-sys/build.rs
index dabe69a..a59da9a 100644
--- a/optee-utee/optee-utee-sys/build.rs
+++ b/optee-utee/optee-utee-sys/build.rs
@@ -19,11 +19,9 @@ use std::env;
 use std::path::Path;
 
 fn main() {
-    let optee_os_dir = 
env::var("OPTEE_OS_DIR").unwrap_or("../../optee/optee_os".to_string());
-    let search_path = match env::var("ARCH") {
-        Ok(ref v) if v == "arm" => 
Path::new(&optee_os_dir).join("out/arm/export-ta_arm32/lib"),
-        _ => Path::new(&optee_os_dir).join("out/arm/export-ta_arm64/lib"),
-    };
+    let optee_os_dir = env::var("TA_DEV_KIT_DIR").unwrap();
+    let search_path = Path::new(&optee_os_dir).join("lib");
+
     println!("cargo:rustc-link-search={}", search_path.display());
     println!("cargo:rustc-link-lib=static=utee");
     println!("cargo:rustc-link-lib=static=utils");
diff --git a/optee-utee/systest/build.rs b/optee-utee/systest/build.rs
index 5e2543a..74369de 100644
--- a/optee-utee/systest/build.rs
+++ b/optee-utee/systest/build.rs
@@ -30,7 +30,7 @@ fn main() {
         .header("user_ta_header.h")
         .header("tee_api.h")
         .header("utee_syscalls.h")
-        .include(env::var("OPTEE_OS_INCLUDE").unwrap())
+        .include(env::var("TA_DEV_KIT_DIR").unwrap())
         .type_name(|s, _is_struct, _is_union| {
             if s == "utee_params"
                 || s == "ta_head"


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

Reply via email to