-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix some clang-cl warnings regarding unused parameters #8
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 |
---|---|---|
|
@@ -18,14 +18,15 @@ | |
'conditions': [ | ||
['target_arch in "ia32 x64" and OS!="ios"', { | ||
'defines': [ 'ADLER32_SIMD_SSSE3' ], | ||
'cflags': [ '-mssse3' ], | ||
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. @anonrig Would you happen to know why these variables (cflags, cflags_cpp) don't take hold here even though we are building under Windows with x64. 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. I think it's a GYP issue. It was never meant to support Clang on Windows AFAIK and cflags are passed differently for it. See c1d1878 |
||
'cflags_cpp': [], | ||
'conditions': [ | ||
['OS=="win"', { | ||
'defines': [ 'X86_WINDOWS' ], | ||
},{ | ||
'defines': [ 'X86_NOT_WINDOWS' ], | ||
}], | ||
['OS!="win" or llvm_version!="0.0"', { | ||
'cflags': [ '-mssse3' ], | ||
'xcode_settings': { | ||
'OTHER_CFLAGS': [ '-mssse3' ], | ||
}, | ||
|
@@ -62,6 +63,7 @@ | |
{ | ||
'target_name': 'zlib_arm_crc32', | ||
'type': 'static_library', | ||
'cflags_cpp': [], | ||
'conditions': [ | ||
['OS!="ios"', { | ||
'conditions': [ | ||
|
@@ -174,6 +176,7 @@ | |
{ | ||
'target_name': 'zlib', | ||
'type': 'static_library', | ||
'cflags_cpp': [], | ||
'sources': [ | ||
'<!@pymod_do_main(GN-scraper "<(ZLIB_ROOT)/BUILD.gn" "\\"zlib\\".*?sources = ")', | ||
], | ||
|
@@ -250,6 +253,7 @@ | |
{ | ||
'target_name': 'zlib', | ||
'type': 'static_library', | ||
'cflags_cpp': [], | ||
'direct_dependent_settings': { | ||
'defines': [ | ||
'USE_SYSTEM_ZLIB', | ||
|
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 these work? What are the fixed warnings?
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.
Without these, you are passing-std=c++17 to clang-cl when compiling C code. The better solution would be for the build engine to recognize that it is compiling C code, and not pass the C++ flags.
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'm surprised that it works because I don't see any occurence of
cflags_cpp
in the code base (including the source code of GYP)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.
You are correct. It should be cflags_cc.