Skip to content

Commit

Permalink
build.rs: always use freebsd12 when rustc_dep_of_std is set
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed May 26, 2024
1 parent acc7bb1 commit 8dabe1d
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,21 @@ fn main() {
//
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
// running tests to ensure that the ABI is correct.
match which_freebsd() {
Some(10) if libc_ci => set_cfg("freebsd10"),
Some(11) if libc_ci => set_cfg("freebsd11"),
Some(12) if libc_ci || rustc_dep_of_std => set_cfg("freebsd12"),
Some(13) if libc_ci => set_cfg("freebsd13"),
Some(14) if libc_ci => set_cfg("freebsd14"),
Some(15) if libc_ci => set_cfg("freebsd15"),
Some(_) | None => set_cfg("freebsd11"),
let which_freebsd = if libc_ci {
which_freebsd().expect("libc CI: cannot determine FreeBSD version")
} else if rustc_dep_of_std {
12
} else {
11
};
match which_freebsd {
10 => set_cfg("freebsd10"),
11 => set_cfg("freebsd11"),
12 => set_cfg("freebsd12"),
13 => set_cfg("freebsd13"),
14 => set_cfg("freebsd14"),
15 => set_cfg("freebsd15"),
v => panic!("unsupported FreeBSD version: {}", v),
}

match emcc_version_code() {
Expand Down

0 comments on commit 8dabe1d

Please sign in to comment.