From 497121b08ea243425b4ef787c9c4e1aab53d6ee7 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 23 Jan 2025 21:16:22 +0000 Subject: [PATCH] Bug 1942981 - Add explicit ABI marker to extern fn declaration in rust configure test. r=firefox-build-system-reviewers,sergesanspaille Extern declarations without an explicit ABI are deprecated as of rustc 1.86. Differential Revision: https://phabricator.services.mozilla.com/D235106 --- build/moz.configure/rust.configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure index 66fe90fe5a2c..6b0aa3dc4e6b 100644 --- a/build/moz.configure/rust.configure +++ b/build/moz.configure/rust.configure @@ -439,7 +439,7 @@ def assert_rust_compile(host_or_target, rustc_target, rustc): suffix=".rlib" ) as out_path: with open(in_path, "w") as fd: - source = b'pub extern fn hello() { println!("Hello world"); }' + source = b'pub extern "C" fn hello() { println!("Hello world"); }' log.debug("Creating `%s` with content:", in_path) with LineIO(lambda l: log.debug("| %s", l)) as out: out.write(source)