We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a82e713 commit d22de80Copy full SHA for d22de80
1 file changed
zjit/build.rs
@@ -1,3 +1,5 @@
1
+// This build script is only used for `make zjit-test` for building
2
+// the test binary; ruby builds don't use this.
3
fn main() {
4
use std::env;
5
@@ -21,5 +23,13 @@ fn main() {
21
23
println!("cargo:rustc-link-lib={lib_name}");
22
24
}
25
26
+
27
+ // When doing a combo build, there is a copy of ZJIT symbols in libruby.a
28
+ // and Cargo builds another copy for the test binary. Tell the linker to
29
+ // not complaint about duplicate symbols. For some reason, darwin doesn't
30
+ // suffer the same issue.
31
+ if env::var("TARGET").unwrap().contains("linux") {
32
+ println!("cargo:rustc-link-arg=-Wl,--allow-multiple-definition");
33
+ }
34
35
0 commit comments