Skip to content

Commit 924d002

Browse files
authored
chore(releasing): Remove -Clink-self-contained=no from musl builds (#9771)
* chore(releasing): Remove `-Clink-self-contained=no` from musl builds This was added in c7da80a 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: rust-lang/rust@4c9896f#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 <[email protected]> * Run cross builds when .cargo changes Signed-off-by: Jesse Szwedko <[email protected]>
1 parent 3b4e375 commit 924d002

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

.cargo/config

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ rustflags = ["-C", "link-args=-rdynamic"]
55
rustflags = ["-C", "link-args=-rdynamic"]
66

77

8-
[target.'cfg(target_env = "musl")']
9-
# Turn off self-contained linking mode. This makes rustc rely on the installed musl toolchain to
10-
# find and link against C and C++ runtime objects, instead of linking against the bundled C ones.
11-
rustflags = "-Clink-self-contained=no"
12-
138
# for these musl targets libstdc++ will be linked statically (that's configured in e.g. leveldb-sys)
149
# we provide the location of that library here
1510
[target.x86_64-unknown-linux-musl]

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
deny:
6666
- 'deny.toml'
6767
dependencies:
68+
- ".cargo/**"
6869
- 'Cargo.toml'
6970
- 'Cargo.lock'
7071
- 'rust-toolchain'

0 commit comments

Comments
 (0)