Browse Source

aya-build: clarify naming

Tamir Duberstein 2 days ago
parent
commit
0c7c8097b2
1 changed files with 4 additions and 4 deletions
  1. 4 4
      aya-build/src/lib.rs

+ 4 - 4
aya-build/src/lib.rs

@@ -58,7 +58,7 @@ pub fn build_ebpf<'a>(
         return Err(anyhow!("unsupported endian={endian:?}"));
     };
 
-    let arch = target_arch();
+    let bpf_target_arch = target_arch();
     let target = format!("{target}-unknown-none");
 
     for Package { name, root_dir } in packages {
@@ -92,7 +92,7 @@ pub fn build_ebpf<'a>(
 
             for s in [
                 "--cfg=bpf_target_arch=\"",
-                &arch,
+                &bpf_target_arch,
                 "\"",
                 SEPARATOR,
                 "-Cdebuginfo=2",
@@ -210,8 +210,8 @@ pub fn emit_bpf_target_arch_cfg() {
         .to_str()
         .unwrap_or_else(|| panic!("{RUSTFLAGS}={rustc_cfgs:?} not unicode"));
     if !rustc_cfgs.contains("bpf_target_arch") {
-        let arch = target_arch();
-        println!("cargo:rustc-cfg=bpf_target_arch=\"{arch}\"");
+        let bpf_target_arch = target_arch();
+        println!("cargo:rustc-cfg=bpf_target_arch=\"{bpf_target_arch}\"");
     }
 
     print!("cargo::rustc-check-cfg=cfg(bpf_target_arch, values(");