From 089dc313015cc43ba5c5ec01165b4c2db2b33ae1 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 2 Oct 2026 20:00:20 +0200 Subject: [PATCH] Fix detecting -DU_DISABLE_RENAMING=1 Signed-off-by: Igor Pashev --- rust_icu_release/src/lib.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rust_icu_release/src/lib.rs b/rust_icu_release/src/lib.rs index d2a30e7e..3e8ff8d1 100644 --- a/rust_icu_release/src/lib.rs +++ b/rust_icu_release/src/lib.rs @@ -116,9 +116,17 @@ impl ICUConfig { /// Obtains the needed flags for the C++ compiler. pub fn cppflags(&mut self) -> Result { - self.rep + let cflags = self + .rep .run(&["--cflags", "icu-i18n"]) - .context("while getting the cpp flags") + .context("while getting the cpp flags")?; + + let defs = self + .rep + .run(&["--variable=DEFS", "icu-i18n"]) + .context("while getting the DEFS variable")?; + + Ok([cflags, defs].join(" ")) } /// Obtains the major-minor version number for the library. Returns a string like `64.2`.