[WTF] Fix -Wc++23-lambda-attributes warnings#52369
[WTF] Fix -Wc++23-lambda-attributes warnings#52369webkit-commit-queue merged 1 commit intoWebKit:mainfrom
Conversation
|
EWS run on previous version of this PR (hash d969252) Details
|
Source/WTF/wtf/Compiler.h
Outdated
| #define IGNORE_CXX23_LAMBDA_ATTRIBUTES_BEGIN IGNORE_CLANG_WARNINGS_BEGIN("c++23-lambda-attributes") | ||
| #define IGNORE_CXX23_LAMBDA_ATTRIBUTES_END IGNORE_CLANG_WARNINGS_END |
There was a problem hiding this comment.
Another way to fix this is to add -Wno-c++23-lambda-attributes to Configurations/CommonBase.xcconfig so we just ignore these warnings everywhere.
There was a problem hiding this comment.
What I don't understand is that we're supposed to be building with -std=c++23 so why are we getting this warning in the first place? Did we fail to enable C++23 in some places?
There was a problem hiding this comment.
oh I wonder if it’s because the WTF module map specifies a version < 23
There was a problem hiding this comment.
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX26.2.xctoolchain/usr/bin/clang -x c++ -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fbuild-session-file\=/Users/cdumez/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session @/Volumes/Work/WebKit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JavaScriptCore.build/VerifyModule/JavaScriptCore/c++-gnu++20-arm64e-apple-macos26.2-none/fe7502429db486ee15814c0d75f1b9fd-common-args.resp -MMD -MT dependencies -MF /Volumes/Work/WebKit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JavaScriptCore.build/VerifyModule/JavaScriptCore/c++-gnu++20-arm64e-apple-macos26.2-none/Test.d --serialize-diagnostics /Volumes/Work/WebKit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JavaScriptCore.build/VerifyModule/JavaScriptCore/c++-gnu++20-arm64e-apple-macos26.2-none/Test.dia -c /Volumes/Work/WebKit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JavaScriptCore.build/VerifyModule/JavaScriptCore/c++/Test.cpp -o /Volumes/Work/WebKit/OpenSource/WebKitBuild/JavaScriptCore.build/Debug/JavaScriptCore.build/VerifyModule/JavaScriptCore/c++-gnu++20-arm64e-apple-macos26.2-none/Test.o
Given the c++-gnu++20 in the line, I suspect we forgot to turn on C++23 for some test project in JSC? Maybe we can fix that instead?
|
are we not able to just change WTF to use c++2b / c++23 instead? |
My understanding was that |
|
oh, my suspicion was very close #52369 (comment) |
|
Okay, looking at fixing the module verification now. |
d969252 to
1c144ce
Compare
|
EWS run on previous version of this PR (hash 1c144ce) Details |
| MODULE_VERIFIER_SUPPORTED_LANGUAGES_YES = objective-c++ c++; | ||
|
|
||
| MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = $(MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS_$(WK_HAS_VALID_JSC_PRIVATE_MODULE)); | ||
| MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS_ = gnu17; |
There was a problem hiding this comment.
the gnu17 isnt doing much on these 3 lines since ObjC verification is disabled in JSC for the time being
There was a problem hiding this comment.
Okay, so what do you recommend setting? No value? I was cribbing values from 301180@main.
There was a problem hiding this comment.
I'm trying to help here, but I'm outside my area of expertise. (Assume I know next to nothing about modules.)
There was a problem hiding this comment.
ya I think no value for the _ and NO cases, and just gnu++whatever for the YES value
There was a problem hiding this comment.
just gnu++whatever for the YES value
Any ideas how can I find out the default? Oh, maybe the aforementioned gnu++20?
There was a problem hiding this comment.
the value should be whatever the project uses, which in our case is gnu++23 (I think? or c++23, I forget the difference)
There was a problem hiding this comment.
It's this from Source/JavaScriptCore/Configurations/Base.xcconfig:
CLANG_CXX_LANGUAGE_STANDARD = c++2b;
There was a problem hiding this comment.
Welp, not that:
Source/JavaScriptCore/JavaScriptCore.xcodeproj: warning: Unsupported module verifier language standard "c++2b" (in target 'JavaScriptCore' from project 'JavaScriptCore')
Seems like I need to use just c++23.
1c144ce to
a8aea76
Compare
|
EWS run on current version of this PR (hash a8aea76) Details |
<https://bugs.webkit.org/show_bug.cgi?id=300747> <rdar://162639803> Reviewed by Chris Dumez. * Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig: (MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS): Add. - Set variable based on the value of WK_HAS_VALID_JSC_PRIVATE_MODULE. This is similar to one of the changes in 301180@main for Source/WebKit/Configurations/WebKit.xcconfig. Canonical link: https://commits.webkit.org/301598@main
a8aea76 to
1e73347
Compare
|
Committed 301598@main (1e73347): https://commits.webkit.org/301598@main Reviewed commits have been landed. Closing PR #52369 and removing active labels. |
🛠 vision-apple
1e73347
a8aea76
🧪 wpe-wk2🧪 win-tests🧪 ios-wk2-wpt🧪 api-ios🧪 gtk-wk2