Skip to content

Remove IR files from git#144

Merged
nunoplopes merged 9 commits into
Cpp2Rust:masterfrom
lucic71:ir
May 23, 2026
Merged

Remove IR files from git#144
nunoplopes merged 9 commits into
Cpp2Rust:masterfrom
lucic71:ir

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 22, 2026

IR for src and rust is now generated in build/rules. I modified rule-preprocessor and cpp-rule-preprocessor to generate the IR files in this new dir, and cpp2rust to read rules from thie dir.

I removed check-rules from the github runner because ninja already generates the IR files. I still kept the check-rules target because it's useful for forcing the regeneration of the IR files.

@nunoplopes nunoplopes merged commit dfd12f3 into Cpp2Rust:master May 23, 2026
9 checks passed
nunoplopes pushed a commit that referenced this pull request May 24, 2026
IPPROTO_MPTCP is only defined on Linux. Before #144 the target_os
attribute was used in the IR to define symbols that are platform
specific in order to keep the IR uniform. But since the IR is not
indexed in git anymore, the IR now can be different based on the
platform. As such, I deleted the target_os from the IR.

I also took this opportunity to replace the previous manual parsing of
function attributes in rust with a proper parser, i.e. the cfg-expr
crate. In the future I plan to use more attributes, other than
target_os, for which I will need proper parsing of the function
attributes. For example we also need target_arch, not only target_os.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants