Fix libyuv deps autoroll and roll chromium deps.

This includes:
  - fixing a handrolled raw exec-based DEPS parser that was failing
    to parse Str, similar to crbug.com/1106435.
  - rolling chromium forward by nearly a year. (The last roll that
    landed was crrev.com/c/1797295). This required a bunch of changes in
    order to be able to successfully sync, run gn, and compile:
    - switching the mirrors for three repositories to match chromium,
      which switched in crrev.com/c/2062580.
    - making libyuv write an empty gclient_args file
    - adding a few build_override gn arguments
    - adding nasm as a deps entry, as it's now required by libjpeg_turbo
    - android:
      - adding jdk, libunwindstack, and turbine
      - rolling the android sdk
      - rolling bazel and r8
      - rolling the cipd packages managed by third_party/android_deps
      - adding six and requests to .vpython for the test runner
      - switching to memcpy in a few places to avoid SIGBUS errors on
        arm due to unaligned reads
    - linux:
      - checking out instrumented libraries for msan (including adding
        depot_tools to deps for the hook)
    - mac:
      - adding mac_xcode_version to gclient_gn_args
    - win:
      - limit mac_toolchain to checkout_mac

Bug: 1063768, 1097306
Change-Id: Idd86fffcdac174fd2f7899243a56af4f1ed8077e
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2384320
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
John Budorick 2020-09-07 16:41:20 -07:00 committed by Commit Bot
parent 165f39cd12
commit 33503d9c9c
6 changed files with 1834 additions and 224 deletions

View File

@ -43,3 +43,17 @@ wheel: <
platform: "win_amd64" platform: "win_amd64"
> >
> >
# Used by:
# tools/swarming_client
wheel: <
name: "infra/python/wheels/six-py2_py3"
version: "version:1.15.0"
>
# Used by:
# build/android
wheel: <
name: "infra/python/wheels/requests-py2_py3"
version: "version:2.13.0"
>

2016
DEPS

File diff suppressed because it is too large Load Diff

View File

@ -44,3 +44,13 @@ if (host_os == "mac") {
"hermetic toolchain if the minimum OS version is not met.") "hermetic toolchain if the minimum OS version is not met.")
use_system_xcode = _result == 0 use_system_xcode = _result == 0
} }
declare_args() {
# Tracing support requires //third_party/perfetto.
enable_base_tracing = false
use_perfetto_client_library = false
# Allows googletest to pretty-print various absl types.
# Defined here rather than in gtest.gni to match chromium.
gtest_enable_absl_printers = true
}

View File

@ -210,7 +210,8 @@ void ARGB4444ToARGBRow_C(const uint8_t* src_argb4444,
void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width) { void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width) {
int x; int x;
for (x = 0; x < width; ++x) { for (x = 0; x < width; ++x) {
uint32_t ar30 = *(const uint32_t*)src_ar30; uint32_t ar30;
memcpy(&ar30, src_ar30, sizeof ar30);
uint32_t b = (ar30 >> 2) & 0xff; uint32_t b = (ar30 >> 2) & 0xff;
uint32_t g = (ar30 >> 12) & 0xff; uint32_t g = (ar30 >> 12) & 0xff;
uint32_t r = (ar30 >> 22) & 0xff; uint32_t r = (ar30 >> 22) & 0xff;
@ -224,7 +225,8 @@ void AR30ToARGBRow_C(const uint8_t* src_ar30, uint8_t* dst_argb, int width) {
void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width) { void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width) {
int x; int x;
for (x = 0; x < width; ++x) { for (x = 0; x < width; ++x) {
uint32_t ar30 = *(const uint32_t*)src_ar30; uint32_t ar30;
memcpy(&ar30, src_ar30, sizeof ar30);
uint32_t b = (ar30 >> 2) & 0xff; uint32_t b = (ar30 >> 2) & 0xff;
uint32_t g = (ar30 >> 12) & 0xff; uint32_t g = (ar30 >> 12) & 0xff;
uint32_t r = (ar30 >> 22) & 0xff; uint32_t r = (ar30 >> 22) & 0xff;
@ -238,7 +240,8 @@ void AR30ToABGRRow_C(const uint8_t* src_ar30, uint8_t* dst_abgr, int width) {
void AR30ToAB30Row_C(const uint8_t* src_ar30, uint8_t* dst_ab30, int width) { void AR30ToAB30Row_C(const uint8_t* src_ar30, uint8_t* dst_ab30, int width) {
int x; int x;
for (x = 0; x < width; ++x) { for (x = 0; x < width; ++x) {
uint32_t ar30 = *(const uint32_t*)src_ar30; uint32_t ar30;
memcpy(&ar30, src_ar30, sizeof ar30);
uint32_t b = ar30 & 0x3ff; uint32_t b = ar30 & 0x3ff;
uint32_t ga = ar30 & 0xc00ffc00; uint32_t ga = ar30 & 0xc00ffc00;
uint32_t r = (ar30 >> 20) & 0x3ff; uint32_t r = (ar30 >> 20) & 0x3ff;
@ -2605,10 +2608,9 @@ void SetRow_C(uint8_t* dst, uint8_t v8, int width) {
} }
void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width) { void ARGBSetRow_C(uint8_t* dst_argb, uint32_t v32, int width) {
uint32_t* d = (uint32_t*)(dst_argb);
int x; int x;
for (x = 0; x < width; ++x) { for (x = 0; x < width; ++x) {
d[x] = v32; memcpy(dst_argb + x * sizeof v32, &v32, sizeof v32);
} }
} }

View File

@ -37,7 +37,7 @@ CHROMIUM_LOG_TEMPLATE = CHROMIUM_SRC_URL + '/+log/%s'
CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s' CHROMIUM_FILE_TEMPLATE = CHROMIUM_SRC_URL + '/+/%s/%s'
COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$') COMMIT_POSITION_RE = re.compile('^Cr-Commit-Position: .*#([0-9]+).*$')
CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([0-9a-z]+)\'$') CLANG_REVISION_RE = re.compile(r'^CLANG_REVISION = \'([0-9a-z-]+)\'$')
ROLL_BRANCH_NAME = 'roll_chromium_revision' ROLL_BRANCH_NAME = 'roll_chromium_revision'
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
@ -69,6 +69,7 @@ def ParseDepsDict(deps_content):
local_scope = {} local_scope = {}
global_scope = { global_scope = {
'Var': VarLookup(local_scope), 'Var': VarLookup(local_scope),
'Str': lambda s: s,
'deps_os': {}, 'deps_os': {},
} }
exec(deps_content, global_scope, local_scope) exec(deps_content, global_scope, local_scope)
@ -274,7 +275,7 @@ def CalculateChangedClang(new_cr_rev):
match = CLANG_REVISION_RE.match(line) match = CLANG_REVISION_RE.match(line)
if match: if match:
return match.group(1) return match.group(1)
raise RollError('Could not parse Clang revision!') raise RollError('Could not parse Clang revision from:\n' + '\n'.join(' ' + l for l in lines))
with open(CLANG_UPDATE_SCRIPT_LOCAL_PATH, 'rb') as f: with open(CLANG_UPDATE_SCRIPT_LOCAL_PATH, 'rb') as f:
current_lines = f.readlines() current_lines = f.readlines()

View File

@ -3,6 +3,7 @@
vars = { vars = {
'chromium_git': 'https://chromium.googlesource.com', 'chromium_git': 'https://chromium.googlesource.com',
'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d', 'chromium_revision': '1b9c098a08e40114e44b6c1ec33ddf95c40b901d',
'ignored_str': Str(''),
} }
deps = { deps = {