-
Notifications
You must be signed in to change notification settings - Fork 217
Support 64bit MP_DIGIT on Windows under clang-cl #592
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
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -49,7 +49,19 @@ endif() | |
|
|
||
| # We only differentiate between MSVC and GCC-compatible compilers | ||
| if(MSVC) | ||
| set(LTM_C_FLAGS -W3) | ||
| if (CMAKE_C_COMPILER_ID STREQUAL "Clang") | ||
| # We are clang-cl | ||
| # Some flags for linux similarity and warnings | ||
| set(LTM_C_FLAGS -fstrict-aliasing /W3 /D_CRT_SECURE_NO_WARNINGS) | ||
| # Optimization flags | ||
| set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Zc:inline /Gw /Gy /clang:-funroll-loops") | ||
| # Pass optimization option to override the debug flags, and allow dead code elimination | ||
| set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /clang:-O1" ) | ||
| # We need to link the runtime for 128 bit int support, which clang-cl has | ||
| link_libraries(clang_rt.builtins-x86_64.lib) | ||
| else() | ||
| set(LTM_C_FLAGS /W3 /D_CRT_SECURE_NO_WARNINGS) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we want |
||
| endif() | ||
| elseif(WATCOM) | ||
| set(LTM_C_FLAGS -fo=.obj -oaxt -3r -w3) | ||
| else() | ||
|
|
@@ -63,7 +75,7 @@ else() | |
| endif() | ||
|
|
||
| # What compiler do we have and what are their...uhm... peculiarities | ||
| if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang") | ||
| if(CMAKE_C_COMPILER_ID MATCHES "(C|c?)lang" AND NOT MSVC) | ||
| list(APPEND LTM_C_FLAGS -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header) | ||
| # Clang requires at least '-O1' for dead code elimination | ||
| set(CMAKE_C_FLAGS_DEBUG "-O1 ${CMAKE_C_FLAGS_DEBUG}") | ||
|
|
@@ -97,7 +109,7 @@ add_library(${PROJECT_NAME} | |
|
|
||
| target_include_directories(${PROJECT_NAME} PUBLIC | ||
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}> | ||
| $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change must be reverted. We decided that our header files will reside in a separate folder. |
||
| ) | ||
|
|
||
| target_compile_options(${PROJECT_NAME} BEFORE PRIVATE | ||
|
|
||
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.
Same here.