At some time after 0.20, --emit-no-std broke. Minimal example:
compile_commands.json:
[
{
"arguments": [
"any-cc",
"empty.h"
],
"directory": "/tmp/test",
"file": "issue.h"
}
]
issue.h:
command:
$ c2rust transpile compile_commands.json --emit-no-std
output in issue.rs:
#![allow([elided])]
#![no_std]
#[no_mangle]
pub static mut x: std::ffi::c_int = 0;
In 0.20, this produced:
#![allow([elided])]
#![no_std]
#[no_mangle]
pub static mut x: libc::c_int = 0;