Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve comments when dumping preprocessed input headers #817

Merged

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Jul 17, 2017

It should be really easy to generate standalone, isolated test cases for bindgen bugs now \o/

See each commit for further details.

r? @emilio

fitzgen added 4 commits July 17, 2017 10:03
The -C flag tells Clang's preprocessor not to strip comments, but unfortunately
Clang will only accept it when dumping the preprocessed file to stdout, which is
the -E flag. This means that we need to capture the child process's stdout and
then copy it to a file ourselves now.
src/lib.rs Outdated
Ok(())
} else {
Err(io::Error::new(io::ErrorKind::Other,
"clang exited with non-zero status"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Alignment.

For very large logs to stdout, this prevents deadlocks.
@fitzgen fitzgen force-pushed the include-comments-in-preprocessed-file branch from 5c7e3b6 to 02da653 Compare July 18, 2017 16:51
@fitzgen
Copy link
Member Author

fitzgen commented Jul 18, 2017

Thanks for the review :) Force pushed an indentation fix.

@bors-servo r=emilio

@bors-servo
Copy link

📌 Commit 02da653 has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 02da653 with merge 10ea03c...

bors-servo pushed a commit that referenced this pull request Jul 18, 2017
…=emilio

Preserve comments when dumping preprocessed input headers

It should be really easy to generate standalone, isolated test cases for bindgen bugs now \o/

See each commit for further details.

r? @emilio
@bors-servo
Copy link

☀️ Test successful - status-travis
Approved by: emilio
Pushing 10ea03c to master...

@bors-servo bors-servo merged commit 02da653 into rust-lang:master Jul 18, 2017
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.

4 participants