Skip to content

Commit 3dfc7fe

Browse files
committed
bridge_icu: put the libicudata link hack here, where it belongs
Some pending work surfaced a problem where the icudata link order wasn't correct in some situations. Putting the link ordering hack with the rest of the ICU logic fixes things.
1 parent 547ea5a commit 3dfc7fe

4 files changed

Lines changed: 16 additions & 15 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ tectonic_bridge_core = "thiscommit:2023-06-11:PvhF7YB"
159159
tectonic_bridge_flate = "thiscommit:2021-01-01:eer4ahL4"
160160
tectonic_bridge_graphite2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
161161
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
162-
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
162+
tectonic_bridge_icu = "thiscommit:2023-09-17:AwTXf3W"
163163
tectonic_bundles = "thiscommit:2022-03-29:SFnXSaL"
164164
tectonic_cfg_support = "thiscommit:aeRoo7oa"
165165
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"

crates/bridge_icu/build.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! this crate is needed. Vendoring the ICU library is almost certainly not
88
//! something that one should do.
99
10-
use tectonic_dep_support::{Configuration, Dependency, Spec};
10+
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};
1111

1212
struct IcuSpec;
1313

@@ -22,6 +22,7 @@ impl Spec for IcuSpec {
2222
}
2323

2424
fn main() {
25+
let target = std::env::var("TARGET").unwrap();
2526
let cfg = Configuration::default();
2627
let dep = Dependency::probe(IcuSpec, &cfg);
2728

@@ -39,4 +40,14 @@ fn main() {
3940
println!();
4041

4142
dep.emit();
43+
44+
// vcpkg-rs is not guaranteed to emit libraries in the order required by a
45+
// single-pass linker, so we might need to make sure that's done right.
46+
47+
if cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
48+
// add icudata to the end of the list of libs as vcpkg-rs
49+
// does not order individual libraries as a single pass
50+
// linker requires.
51+
println!("cargo:rustc-link-lib=icudata");
52+
}
4253
}

crates/xetex_layout/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[package]
77
name = "tectonic_xetex_layout"
8-
version = "0.0.0-dev.0" # assigned with cranko (see README)
8+
version = "0.0.0-dev.0" # assigned with cranko (see README)
99
authors = ["Peter Williams <peter@newton.cx>"]
1010
description = """
1111
XeTeX's font loading and layout interface encapsulation, as a crate.
@@ -38,6 +38,6 @@ tectonic_bridge_core = "thiscommit:2021-01-16:wie2Ejoh"
3838
tectonic_bridge_graphite2 = "2722731f9e32c6963fe8c8566a201b33672c5c5a"
3939
tectonic_bridge_freetype2 = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
4040
tectonic_bridge_harfbuzz = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
41-
tectonic_bridge_icu = "2c1ffcd702a662c003bd3d7d0ca4d169784cb6ad"
41+
tectonic_bridge_icu = "thiscommit:2023-09-17:6uIZ4lA"
4242
tectonic_cfg_support = "thiscommit:aeRoo7oa"
4343
tectonic_dep_support = "5faf4205bdd3d31101b749fc32857dd746f9e5bc"

crates/xetex_layout/build.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{
1313
path::{Path, PathBuf},
1414
};
1515
use tectonic_cfg_support::target_cfg;
16-
use tectonic_dep_support::{Backend, Configuration, Dependency, Spec};
16+
use tectonic_dep_support::{Configuration, Dependency, Spec};
1717

1818
struct FontconfigSpec;
1919

@@ -188,16 +188,6 @@ fn main() {
188188

189189
deps.emit();
190190

191-
// vcpkg-rs is not guaranteed to emit libraries in the order required by a
192-
// single-pass linker, so we might need to make sure that's done right.
193-
194-
if dep_cfg.backend == Backend::Vcpkg && target.contains("-linux-") {
195-
// add icudata to the end of the list of libs as vcpkg-rs
196-
// does not order individual libraries as a single pass
197-
// linker requires.
198-
println!("cargo:rustc-link-lib=icudata");
199-
}
200-
201191
// Copy the static header file for C preprocessing convenience.
202192

203193
let mut main_header_src = manifest_dir;

0 commit comments

Comments
 (0)