mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
ZJIT: Add --allow-multiple-definition for make zjit-test
This commit is contained in:
parent
2297afda7f
commit
1fed568e3e
Notes:
git
2025-05-20 16:30:17 +00:00
@ -1,3 +1,5 @@
|
||||
// This build script is only used for `make zjit-test` for building
|
||||
// the test binary; ruby builds don't use this.
|
||||
fn main() {
|
||||
use std::env;
|
||||
|
||||
@ -21,5 +23,13 @@ fn main() {
|
||||
println!("cargo:rustc-link-lib={lib_name}");
|
||||
}
|
||||
}
|
||||
|
||||
// When doing a combo build, there is a copy of ZJIT symbols in libruby.a
|
||||
// and Cargo builds another copy for the test binary. Tell the linker to
|
||||
// not complaint about duplicate symbols. For some reason, darwin doesn't
|
||||
// suffer the same issue.
|
||||
if env::var("TARGET").unwrap().contains("linux") {
|
||||
println!("cargo:rustc-link-arg=-Wl,--allow-multiple-definition");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user