0
Commit Graph

15 Commits

Author SHA1 Message Date
Aleksey Khoroshilov
19908c1f1e Mark generated buildflag headers with IWYU always_keep pragma.
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}
2024-05-23 20:16:41 +00:00
Jacobo Aragunde Pérez
74fc83e4d2 Use raw strings for regexps in Python code.
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}
2023-10-26 08:29:23 +00:00
Takuto Ikuta
3dab32e086 build: update shebang to python3
This assumes that CQ has enough coverage for these scripts if they are
important.

Derived from https://crrev.com/c/4078643/4/build/android/pylib/symbols/mock_addr2line/mock_addr2line#1

This is made by
$ rg -l '#!.*python$' build | \
  xargs sed -i 's/\(#!.*\)python$/\1python3/'

Bug: 1406153
Change-Id: I3df47e000c690ce8af341ff317539c4faa58e3bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4159758
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091953}
2023-01-12 18:52:00 +00:00
Avi Drissman
73a09d1a67 Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

An earlier version of this CL, https://crrev.com/c/3879808,
was reverted due to an issue that was resolved with
https://crrev.com/c/3881211.

No-Try: true
Bug: 1098010
Change-Id: I91174ff0a9dd8b6dee79e6cba8209b614ce2b712
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3884220
Reviewed-by: Mark Mentovai <mark@chromium.org>
Auto-Submit: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044745}
2022-09-08 20:33:38 +00:00
Rebekah Potter
184a820046 Revert "Update copyright headers in build/, build_overrides/, and buildtools/"
This reverts commit 8996d5a5ca.

Reason for revert: Breaks android-binary-size bot, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1361092

Original change's description:
> Update copyright headers in build/, build_overrides/, and buildtools/
>
> The methodology used to generate this CL is documented in
> https://crbug.com/1098010#c21.
>
> No-Try: true
> Bug: 1098010
> Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
> Auto-Submit: Avi Drissman <avi@chromium.org>
> Commit-Queue: Avi Drissman <avi@chromium.org>
> Owners-Override: Avi Drissman <avi@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1044227}

Bug: 1098010
Change-Id: Ie1b5a07d859e98588c1497220aac54834ea5d7f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3880816
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Nidhi Jaju <nidhijaju@chromium.org>
Commit-Queue: Nidhi Jaju <nidhijaju@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044284}
2022-09-08 01:08:54 +00:00
Avi Drissman
8996d5a5ca Update copyright headers in build/, build_overrides/, and buildtools/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c21.

No-Try: true
Bug: 1098010
Change-Id: I0323d0734081fc1aaf3b9ec3b8184411fe1a368a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3879808
Auto-Submit: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1044227}
2022-09-07 22:46:30 +00:00
Jeroen Dhollander
9d1a14827b Fix clangd unused-includes warning for buildflags files
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}
2022-07-11 10:14:44 +00:00
Aleksey Khoroshilov
dad22a109c Improve buildflag header guard generation to handle unsupported chars.
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}
2022-04-08 11:08:26 +00:00
Takuto Ikuta
1e7fbc0c46 build: remove windows version check
This is to update build repo used in native_client which still has win7
builder.
https://crrev.com/c/3303337/13
https://ci.chromium.org/ui/p/nacl/builders/try/nacl-win7_64_arm_newlib_opt/8099/overview

Bug: 1208028
Change-Id: Ice07f2e732795a6780e739efcbdb2ecdf649a25b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3327836
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Takuto Ikuta <tikuta@chromium.org>
Cr-Commit-Position: refs/heads/main@{#956026}
2022-01-06 03:50:54 +00:00
Bruce Dawson
52c749c82a Require Windows 10 for building Chromium
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}
2020-12-03 16:44:26 +00:00
brettw
06c2ba3165 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/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}
2015-11-26 09:22:27 +00:00
brettw
c7cde6acb6 Revert of New build flag system, convert Google Now flag (patchset id:20001 of https://codereview.chromium.org/1475513006/ )
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}
2015-11-25 22:25:43 +00:00
brettw
cbc1cd295b 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

Review URL: https://codereview.chromium.org/1475513006

Cr-Commit-Position: refs/heads/master@{#361741}
2015-11-25 21:53:26 +00:00
raymes
4496a9a456 Revert of New build flag system, convert Google Now flag (patchset id:260001 of https://codereview.chromium.org/1458653002/ )
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}
2015-11-25 03:19:12 +00:00
brettw
3118dde528 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.

Review URL: https://codereview.chromium.org/1458653002

Cr-Commit-Position: refs/heads/master@{#361527}
2015-11-25 02:45:24 +00:00