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

Commit e632ede7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Floss: Check for C++ output dir instead of Rust output dir" am: c5b2dd89

parents f87125cb c5b2dd89
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ class HostBuild():
        self.env['RUSTFLAGS'] = self._generate_rustflags()
        self.env['CXX_ROOT_PATH'] = os.path.join(self.platform_dir, 'bt')
        self.env['CROS_SYSTEM_API_ROOT'] = os.path.join(self.platform_dir, 'system_api')
        self.env['CXX_OUTDIR'] = self._gn_default_output()

    def run_command(self, target, args, cwd=None, env=None):
        """ Run command and stream the output.
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ use pkg_config::Config;

fn main() {
    let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap();
    let cxx_outdir = std::env::var_os("CXX_OUTDIR").unwrap();

    // The main linking point with c++ code is the libbluetooth-static.a
    // These includes all the symbols built via C++ but doesn't include other
@@ -9,7 +10,7 @@ fn main() {
    println!("cargo:rustc-link-lib=static=bluetooth-static");
    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());
    println!("cargo:rerun-if-changed={}", cxx_outdir.into_string().unwrap());

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