Skip to content

Generating build files for Windows is failing #1192

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

Closed
kaadam opened this issue Dec 15, 2021 · 0 comments · Fixed by #1195
Closed

Generating build files for Windows is failing #1192

kaadam opened this issue Dec 15, 2021 · 0 comments · Fixed by #1195
Labels
windows Add this to all windows specific issues or PRs

Comments

@kaadam
Copy link
Collaborator

kaadam commented Dec 15, 2021

With a recent version of Flang, I got the following error message after this PR #1129 :
It seems preprocessing upperilm.in with clang-cl is not working.
It blocks to enable build Flang for Windows until CMakefiles #1184 at the moment.

-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Found PythonInterp: C:/Users/sed/AppData/Local/Programs/Python/Python39/python.exe (found version "3.9")
-- Flang version: 12.0.0
-- The ASM compiler identification is Clang
-- Found assembler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/Llvm/x64/bin/clang-cl.exe
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of gregset_t
-- Check size of gregset_t - failed
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- The Fortran compiler identification is Flang
C:/flang_work_dir/flang/tools/flang2/utils/upper/upperilm.in
CMake Error at tools/flang2/utils/upper/CMakeLists.txt:29 (message):
  Preprocessing of upperilm.in failed; aborting.
@kaadam kaadam added the windows Add this to all windows specific issues or PRs label Dec 15, 2021
kaadam added a commit to kaadam/flang that referenced this issue 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: flang-compiler#1192
kaadam added a commit to kaadam/flang that referenced this issue 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: flang-compiler#1192
kaadam added a commit to kaadam/flang that referenced this issue 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.

Fixes: flang-compiler#1192
kaadam added a commit to kaadam/flang that referenced this issue 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
kaadam added a commit to kaadam/flang that referenced this issue Dec 17, 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
bryanpkc pushed a commit that referenced this issue Dec 21, 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: #1192
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 a pull request may close this issue.

1 participant