DemesneGH commented on code in PR #245:
URL: 
https://github.com/apache/teaclave-trustzone-sdk/pull/245#discussion_r2473114474


##########
optee-utee-build/src/linker.rs:
##########
@@ -126,10 +126,11 @@ impl Linker {
         out_dir: PathBuf,
         ta_dev_kit_dir: PathBuf,
     ) -> Result<(), Error> {
-        const ENV_TARGET_TA: &str = "TARGET_TA";
-        println!("cargo:rerun-if-env-changed={}", ENV_TARGET_TA);
+        // cargo passes TARGET as env to the build scripts
+        const ENV_TARGET: &str = "TARGET";
+        println!("cargo:rerun-if-env-changed={}", ENV_TARGET);
         let mut aarch64_flag = true;
-        match env::var(ENV_TARGET_TA) {
+        match env::var(ENV_TARGET) {
             Ok(ref v) if v == "arm-unknown-linux-gnueabihf" || v == 
"arm-unknown-optee" => {

Review Comment:
   I’ve checked whether the interfaces of `optee-utee-build` crate need any 
adjustments for the new building system.
   
   After reviewing the interface layer (from cargo to the build script 
parameter passing), the build script mainly reads Cargo auto-set environment 
variables and the `TA_DEV_KIT` set by developer. I think this interface looks 
clear and does not require changes (see the appendix in `cargo-optee/README.md` 
for details).
   
   Therefore, this is indeed an inner logic refinement issue. Let's create a 
separate issue to track this refactoring and resolve it in another PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to