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

Commit 01cef9a2 authored by Sonny Sasaka's avatar Sonny Sasaka
Browse files

Floss: Fix rerun-if-changed for topshim

rerun-if-changed should not contain `-I`, and only the topmost directory
is needed because cargo scans for the directory recursively.

Bug: 221310414
Tag: #floss
Test: Manual - `cargo build` and check that topshim is only built once
unless a file inside /system is touched.

Change-Id: I4558d260498c79bc0a6d5362e36504159464c918
parent 1ab46ce1
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -29,10 +29,8 @@ fn main() {
    let bt_searches =
        paths.iter().map(|tail| format!("-I{}{}", search_root, tail)).collect::<Vec<String>>();

    // Also re-run the build if anything in the C++ build changes
    for path in bt_searches.iter() {
        println!("cargo:rerun-if-changed={}", path);
    }
    // Also re-run bindgen if anything in the C++ source changes
    println!("cargo:rerun-if-changed={}{}", search_root, "/system/");

    // "-x" and "c++" must be separate due to a bug
    let clang_args: Vec<&str> = vec!["-x", "c++", "-std=c++17"];