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
Introduce new SDL compile flags on Windows and fix warnings. #1035
Conversation
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
…c/oneTBB into dev/sarathna/win_flags Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
cmake/compilers/Intel.cmake
Outdated
set(TBB_OPENMP_FLAG /Qopenmp) | ||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /Qcf-protection:full) |
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.
I am not too familiar with the purpose of each of these flags variables, but isn't /Qcf-protection
a code generation instead of a linker option?
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.
/Qcf-protection as a code-generation option has performance impact. And I think it does not have any impact as linker option. I'll remove this flag for now.
cmake/compilers/MSVC.cmake
Outdated
@@ -35,6 +35,14 @@ endif() | |||
set(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS) | |||
set(TBB_COMMON_COMPILE_FLAGS /volatile:iso /FS /EHsc) | |||
|
|||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /GS /W4) |
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.
Aren't these already set on lines 22 and 35 above?
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.
I believe in line 22 :
set(TBB_WARNING_LEVEL
But /GS seems to be set in line 35 for TBB_LIB_COMPILE_FLAGS and maybe that's good enough - we dont need for common compile flag.
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.
The warnings in TBB-malloc starts showing for MSVC build only when /W4 is added.
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.
There appear to be some TODOs in src/tbbmalloc/CMakeLists.txt with regards to that.
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.
Thanks for the suggestion!. Removed w4 warning level from common compile flags and added to TBB_WARNING_LEVEL in tbbmalloc. Verified all the warnings are fixed.
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
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.
LGTM
Fix review comments. Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
Description
Add SDL related compiler flags for MSVC and fix warnings in Windows build.
Fixes # - issue number(s) if exists
Type of change
Choose one or multiple, leave empty if none of the other choices apply
Add a respective label(s) to PR if you have permissions
Tests
Documentation
Breaks backward compatibility
Notify the following users
List users with
@
to send notificationsOther information