-
Notifications
You must be signed in to change notification settings - Fork 139
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
Update CMake files to support Windows platform #1003
Conversation
Note: I had planned to submit a PR to update the CMake files after the current PRs are merged. I'd like to wait until the runtime and pgmath PRs are merged, then I can see where we are. |
On windows if you are building with clang with MSVC ABI |
Yes, you're right. I tested with clang for windows. It seems It was a side effect of my built clang (I don't know why). I dropped that change. Thanks for the comment. |
@xoviat sorry, I think it would be nice to enable the basic build, maybe it makes the review process easier. In my opinion it could be merge independently of the other Windows changes, of course if you and others agree with that. |
@@ -9,45 +9,52 @@ cmake_minimum_required(VERSION 3.3) | |||
# In order to bootstrap the runtime library we need to skip | |||
# CMake's Fortran tests | |||
SET(CMAKE_Fortran_COMPILER_WORKS 1) | |||
SET(CMAKE_Fortran_ABI_COMPILED 0) | |||
SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1) | |||
SET(CMAKE_Fortran_MODDIR_FLAG "-J ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you run CMake with -DCMAKE_Fortran_COMPILER_ID=Flang
? That should set CMAKE_Fortran_MODDIR_FLAG
correctly.
Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include-static | ||
) | ||
if (MSVC) | ||
set_property(TARGET flang_static PROPERTY OUTPUT_NAME libflang) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 489 as well.
@@ -1,3 +1,4 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spurious blank line.
@@ -7,11 +7,18 @@ | |||
set(OMPSTUB_SRC init_nomp.c ompstubs.c) | |||
|
|||
add_flang_library(ompstub_static ${OMPSTUB_SRC}) | |||
if (MSVC) | |||
set_property(TARGET ompstub_static PROPERTY OUTPUT_NAME libompstub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent this line and line 13.
This PR aims to enable the build for Windows x64. Windows port of Flang is not ready yet, but it would be nice if anybody could run a build and check the current status.
This PR is created based on #464, since there is no any activity on that that's why I opened a new one.