Summary: | Xcode prepends line comments from WTF/Compiler.h to *.sb files | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ross Kirsling <ross.kirsling> | ||||
Component: | Web Template Framework | Assignee: | Ross Kirsling <ross.kirsling> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, bfulgham, commit-queue, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=184062 | ||||||
Attachments: |
|
Description
Ross Kirsling
2018-03-29 17:46:06 PDT
The fix would be two-fold: 1. Add a script step to remove comment lines from processed profiles. 2. Change preprocessor mode to C++. (In reply to Alexey Proskuryakov from comment #1) > The fix would be two-fold: > > 1. Add a script step to remove comment lines from processed profiles. > 2. Change preprocessor mode to C++. Looks like both parts might be doable all in one step here: https://github.com/WebKit/webkit/blob/master/Source/WebKit/DerivedSources.make#L220-L227 I wonder if it's safe to replace all of the above with the following? > TEXT_PREPROCESSOR_FLAGS=-E -P -x -w (In reply to Ross Kirsling from comment #2) > I wonder if it's safe to replace all of the above with the following? > > TEXT_PREPROCESSOR_FLAGS=-E -P -x -w Sorry, that should have been: > TEXT_PREPROCESSOR_FLAGS=-E -P -w The C++ preprocessor would result in breaking comments that contain URLs, so a step to remove semicolon based comments is necessary. This is all of course based on an assumption that we will never have two slashes in an actual sandbox rule. I think that it’s an ok assumption to make. (In reply to Alexey Proskuryakov from comment #4) > The C++ preprocessor would result in breaking comments that contain URLs, so > a step to remove semicolon based comments is necessary. > > This is all of course based on an assumption that we will never have two > slashes in an actual sandbox rule. I think that it’s an ok assumption to > make. That makes sense. I just discovered your original motivation in https://bugs.webkit.org/show_bug.cgi?id=83827. :) Created attachment 336872 [details]
Patch
*** Bug 181309 has been marked as a duplicate of this bug. *** I believe this patch satisfies the desired criteria. It is naive in indiscriminately treating semicolons as comment-openers in *.sb.in files, but it's a simple fix that's compatible with the way those files are currently used. Comment on attachment 336872 [details]
Patch
Looks good. r=me.
Comment on attachment 336872 [details] Patch Clearing flags on attachment: 336872 Committed r230213: <https://trac.webkit.org/changeset/230213> All reviewed patches have been landed. Closing bug. |