Files
bdwgc-rust/build.rs
dependabot[bot] 10fbe89a92 chore(deps): Bump vendor/bdwgc from 5901d16 to 832713e (#498)
Bumps [vendor/bdwgc](https://github.com/bdwgc/bdwgc) from `5901d16` to
`832713e`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="832713e82a"><code>832713e</code></a>
GH Actions: Update after prefixing CMake BUILD_SHARED_LIBS option</li>
<li><a
href="382767dcbb"><code>382767d</code></a>
AppVeyor CI: Update after prefixing CMake BUILD_SHARED_LIBS option</li>
<li><a
href="416e4fa765"><code>416e4fa</code></a>
Update AUTHORS file (add Ben Leadbetter)</li>
<li><a
href="e93ee11276"><code>e93ee11</code></a>
Rename CMake BUILD_SHARED_LIBS option to GC_BUILD_SHARED_LIBS</li>
<li>See full diff in <a
href="5901d16bbc...832713e82a">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yota Toyama <raviqqe@gmail.com>
2025-12-13 03:51:40 +00:00

72 lines
1.8 KiB
Rust

const LIB_ATOMIC_OPS_DIR: &str = "vendor/libatomic_ops";
const LIB_GC_DIR: &str = "vendor/bdwgc";
#[cfg(feature = "autotools")]
fn main() {
for dir in &[LIB_ATOMIC_OPS_DIR, LIB_GC_DIR] {
std::process::Command::new("sh")
.arg("-c")
.arg(format!("cd {dir} && ./autogen.sh"))
.output()
.unwrap();
}
let dst = autotools::Config::new(LIB_ATOMIC_OPS_DIR)
.cflag("-fPIC")
.build();
println!(
"cargo:rustc-link-search=native={}",
dst.join("lib").display()
);
println!("cargo:rustc-link-lib=static=atomic_ops");
let dst = autotools::Config::new(LIB_GC_DIR)
.cflag(format!(
// spell-checker: disable-next-line
"-I{} -L/lib/x86_64-linux-gnu -lpthread -fPIC",
dst.join("include").display()
))
.build();
println!(
"cargo:rustc-link-search=native={}",
dst.join("lib").display()
);
println!("cargo:rustc-link-lib=static=gc");
for dir in &[LIB_ATOMIC_OPS_DIR, LIB_GC_DIR] {
std::process::Command::new("sh")
.arg("-c")
.arg(format!("cd {dir} && git clean -dfx"))
.output()
.unwrap();
}
}
#[cfg(feature = "cmake")]
fn main() {
use cmake::Config;
use std::path::Path;
let libatomic_include_path = Path::new(LIB_ATOMIC_OPS_DIR)
.join("src")
.canonicalize()
.unwrap()
.display()
.to_string()
.replace(r"\\?\", "");
let dst = Config::new(LIB_GC_DIR)
.profile("Release")
.define("GC_BUILD_SHARED_LIBS", "FALSE")
.cflag(format!("-I{}", libatomic_include_path))
.build();
println!(
"cargo:rustc-link-search=native={}",
dst.join("lib").display()
);
println!("cargo:rustc-link-lib=static=gc");
}