Clangd does not detect BUILDFLAG_INTERNAL_* indirect usage and marks
all generated buildflag headers as unused.
Although Chromium has UnusedIncludes disabled, developers and downstream
projects may enable it explicitly in their setup.
Change-Id: I6231a670ba996f189c8535026300a76d338f8f7a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5560319
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305300}
Starting with Python 3.12, use of unescaped backslash in strings is
reported as a SyntaxWarning, and may become an error at a later time.
Backslashes are commonly found in regexp code.
Using raw strings fixes the syntax problem, and it's something that
newer code is already doing, so it fits nicely within the codebase.
Bug: 1487454
Change-Id: I8d42cc3f31da583544ab094d454ef29051e184f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4969774
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Reviewed-by: Oksana Zhuravlova <oksamyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1215379}
Both "build/build_config.h" and all generated "build/XYZ_buildflags.h"
files transiently export "build/buildflag.h".
This caused the clangd linter to raise the "unused include" warning
wherever any of these headers were used.
This CL adds a IWYU pragma informing clangd of this transient include so
it no longer complains when the headers are used.
Test: Compiled
Cq-Include-Trybots: luci.chrome.try:linux-chromeos-chrome
Bug: N/A
Change-Id: I5473ad64153a1d3303520f14ffaf0044ee4cb66a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3751161
Auto-Submit: Jeroen Dhollander <jeroendh@google.com>
Commit-Queue: Jeroen Dhollander <jeroendh@google.com>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1022636}
Buildflag header generator uses directory structure to create header
guards. Any characters that cannot be used as a part of guard identifier
should be replaced, but prior this change not all invalid characters
were replaced.
Currently Chromium does not have issues with invalid guards in buildflag
headers, but other Chromium-based projects may encounter this issue. It
seems reasonable to fix this globally. The more generalized approach
covers all possible invalid chars.
Bug: 1313910
Change-Id: I543f9d1286defb7c3b94a010800d3e79fb1dcca2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3571751
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Auto-Submit: Aleksey Khoroshilov <akhoroshilov@brave.com>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990336}
Windows 7 no longer works for building Chromium and nobody has
volunteered to add support and Windows 7 is an unsupported OS so this
change formalizes that Windows 10 is now required in order to build
Chromium. This updates the documentation and modifies one of the build
scripts so that a readable error message will be displayed when building
on Windows 7 is attempted.
Chromium and its derivatives still run on Windows 7. This only affects
developers.
Bug: 1150302
Change-Id: I1874c691a1405482232323bef025aba4b3ac74b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2570075
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#833327}
This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included.
Converts Google Now to use this and remove the global google now define and grit define.
Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False").
Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency.
Reland of https://codereview.chromium.org/1475513006/
Reland of https://codereview.chromium.org/1458653002/TBR=mark@chromium.org
Review URL: https://codereview.chromium.org/1469383005
Cr-Commit-Position: refs/heads/master@{#361854}
Reason for revert:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20x64%20Builder%20%28dbg%29/builds/69779/steps/compile/logs/stdio
Original issue's description:
> New build flag system, convert Google Now flag
>
> This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included.
>
> Converts Google Now to use this and remove the global google now define and grit define.
>
> Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False").
>
> Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency.
>
> Reland of https://codereview.chromium.org/1458653002/
> TBR=mark@chromium.org
>
> Committed: https://crrev.com/cbc1cd295bc85219ad89326457cd7f5cf003d41c
> Cr-Commit-Position: refs/heads/master@{#361741}
TBR=mark@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1480693003
Cr-Commit-Position: refs/heads/master@{#361749}
This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included.
Converts Google Now to use this and remove the global google now define and grit define.
Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False").
Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency.
Reland of https://codereview.chromium.org/1458653002/TBR=mark@chromium.org
Review URL: https://codereview.chromium.org/1475513006
Cr-Commit-Position: refs/heads/master@{#361741}
Reason for revert:
This seems to have broken webkit builders: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win%20Builder/builds/94668
Original issue's description:
> New build flag system, convert Google Now flag
>
> This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included.
>
> Converts Google Now to use this and remove the global google now define and grit define.
>
> Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False").
>
> Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency.
>
> Committed: https://crrev.com/3118dde528359280fa0cb3c6fc5b6323e834c514
> Cr-Commit-Position: refs/heads/master@{#361527}
TBR=mark@chromium.org,spang@chromium.org,brettw@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1475883002
Cr-Commit-Position: refs/heads/master@{#361541}
This generates headers with build flags rather than forcing them all to be global. It includes an accessor wrapper so that references to the flags will fail if the proper header is not included.
Converts Google Now to use this and remove the global google now define and grit define.
Adds support for grit define values of "true" and "false" for ease of integration with GN (they are mapped to the corresponding Python "True" and "False").
Adds dependencies from the main gyp targets to the new generated feature define target. Since GYP only does hard dependencies one level, this should reduce the chance that somebody adds more of these cases and forces to add a dependency.
Review URL: https://codereview.chromium.org/1458653002
Cr-Commit-Position: refs/heads/master@{#361527}