From dac5dd976e3890aa0304ffb43bdcd95068d550ac Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Fri, 22 Oct 2021 19:43:20 +0000 Subject: [PATCH 1/2] chore(releasing): Remove `-Clink-self-contained=no` from musl builds This was added in c7da80a05d but seems to break builds of Rust 1.56.0 with: ``` = note: /usr/local/bin/../lib/gcc/arm-linux-musleabihf/6.4.0/../../../../arm-linux-musleabihf/bin/ld: cannot find -lunwind collect2: error: ld returned 1 exit status ``` I think this is because of these changes in Rust in 1.56.0: https://github.com/rust-lang/rust/commit/4c9896f279357896d31d811fddc2025d72259498#diff-b78a4729cc6ec9756d0e89273cb5d1b0bb906264d7d5ed5aa6f759ad07d47c62 It isn't immediately clear to me why we can't have Rust build the libraries to link in so opening this for feedback and to see if it works for all of our cross builds. Signed-off-by: Jesse Szwedko --- .cargo/config | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.cargo/config b/.cargo/config index 73f7b9a505b09..aa14df53c72b2 100644 --- a/.cargo/config +++ b/.cargo/config @@ -5,11 +5,6 @@ rustflags = ["-C", "link-args=-rdynamic"] rustflags = ["-C", "link-args=-rdynamic"] -[target.'cfg(target_env = "musl")'] -# Turn off self-contained linking mode. This makes rustc rely on the installed musl toolchain to -# find and link against C and C++ runtime objects, instead of linking against the bundled C ones. -rustflags = "-Clink-self-contained=no" - # for these musl targets libstdc++ will be linked statically (that's configured in e.g. leveldb-sys) # we provide the location of that library here [target.x86_64-unknown-linux-musl] From 00891fcfbdaa5011a311700cf2856e2b1bdb200d Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Fri, 22 Oct 2021 19:57:23 +0000 Subject: [PATCH 2/2] Run cross builds when .cargo changes Signed-off-by: Jesse Szwedko --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 243e280cab160..97d2b62bb29e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,6 +65,7 @@ jobs: deny: - 'deny.toml' dependencies: + - ".cargo/**" - 'Cargo.toml' - 'Cargo.lock' - 'rust-toolchain'