Skip to content

Commit 8831e24

Browse files
authored
Merge pull request #27 from Dushistov/fix-build-with-custom-gcc
Fix build with custom gcc
2 parents a79f9e8 + b8de8c7 commit 8831e24

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

couchbase-lite-core-sys/build.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,11 @@ fn main() {
8787
let target = getenv_unwrap("TARGET");
8888
let mut framework_dirs = vec![];
8989

90-
if cfg!(target_os = "macos") || cfg!(target_os = "ios") {
91-
let (mut addon_include_dirs, mut addon_framework_dirs) =
92-
cc_system_include_dirs().expect("get system include directories from cc failed");
93-
includes.append(&mut addon_include_dirs);
94-
framework_dirs.append(&mut addon_framework_dirs);
95-
}
90+
let (mut addon_include_dirs, mut addon_framework_dirs) =
91+
cc_system_include_dirs().expect("get system include directories from cc failed");
92+
includes.append(&mut addon_include_dirs);
93+
framework_dirs.append(&mut addon_framework_dirs);
94+
9695
run_bindgen_for_c_headers(
9796
&target,
9897
&includes,
@@ -240,6 +239,8 @@ fn cc_system_include_dirs() -> Result<(Vec<PathBuf>, Vec<PathBuf>), String> {
240239
let cc_process = cc_build
241240
.get_compiler()
242241
.to_command()
242+
.env("LANG", "C")
243+
.env("LC_MESSAGES", "C")
243244
.args(&["-v", "-x", "c", "-E", "-"])
244245
.stderr(Stdio::piped())
245246
.stdin(Stdio::piped())

0 commit comments

Comments
 (0)