Skip to content

win: Fix upperilm header generation #1195

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

Merged
merged 1 commit into from
Dec 21, 2021
Merged

Conversation

kaadam
Copy link
Collaborator

@kaadam kaadam commented Dec 16, 2021

clang-cl doesn't recognize "-P -E -x c" compiler arguments,
we should use MSVC version of them "/E /TC".

Seems clang-cl is not able to handle /P /E together
so I only left the necessery one.

Fixes: #1192

@kaadam
Copy link
Collaborator Author

kaadam commented Dec 16, 2021

It was needed to add a list filter since after the upperilm.in is preprocessed following lines appear in the output. We should ignore all of them.

# 1 "upperilm.in"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 325 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "upperilm.in" 2

@kaadam kaadam added the windows Add this to all windows specific issues or PRs label Dec 16, 2021
clang-cl doesn't recognize "-P -E -x c" compiler arguments,
we should use MSVC version of them "/E /TC".

Seems clang-cl is not able to handle /P /E together
so I only left the necessary one.

Due to preprocessing upperilm.in, '#' will be represented in output.
It needs to add a new list filter which exclude those lines
which starts with '#'.

Fixes: flang-compiler#1192
Copy link
Collaborator

@bryanpkc bryanpkc left a comment

Choose a reason for hiding this comment

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

LGTM

@bryanpkc
Copy link
Collaborator

This Windows PR has received the required number of approvals. Merging.

@bryanpkc bryanpkc merged commit aae655a into flang-compiler:master Dec 21, 2021
@kaadam kaadam deleted the upperilm branch January 11, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Add this to all windows specific issues or PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating build files for Windows is failing
3 participants