Skip to content

--emit-no-std broke (regression after 0.20) #1356

@chrysn

Description

@chrysn

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:

int x;

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;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions