Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f66e28c6 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Fix build ignoring new C++ libraries

Cargo was not rerunning build.rs for linking when there were new C++
libraries available. This adds a rerun-if that checks the C++ output
directory for changes when making this decision.

Bug: 203696027
Tag: #floss
Test: ./build.py with C++ changes only and confirm changes applied
Change-Id: I46c968ce92ffddb7538b31df2103b79b0377fe3a
parent edf27c52
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7,7 +7,9 @@ fn main() {
    // These includes all the symbols built via C++ but doesn't include other
    // links (i.e. pkg-config)
    println!("cargo:rustc-link-lib=static=bluetooth-static");
    println!("cargo:rustc-link-search=native={}", target_dir.into_string().unwrap());
    println!("cargo:rustc-link-search=native={}", target_dir.clone().into_string().unwrap());
    // Also re-run the build if anything in the C++ build changes
    println!("cargo:rerun-if-changed={}", target_dir.into_string().unwrap());

    // A few dynamic links
    println!("cargo:rustc-link-lib=dylib=flatbuffers");