Skip to content

Commit 997865f

Browse files
Jiawei-ShaoDawn LUCI CQ
authored andcommitted
Roll build folder
This patch rolls the `build/` folder and other third-party folders to match their revisions to the ones used by the latest Chromium in order to use the latest Windows 11 SDK 26100. Fixed: chromium:374852565 Change-Id: I16185ff539e113c1c4bafcc04932d59769bbff48 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/211954 Reviewed-by: Corentin Wallez <[email protected]> Commit-Queue: Jiawei Shao <[email protected]>
1 parent c44271b commit 997865f

File tree

14 files changed

+170
-36
lines changed

14 files changed

+170
-36
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
path = third_party/libc++abi/src
1919
url = https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi
2020
gclient-condition = dawn_standalone
21+
[submodule "third_party/libdrm/src"]
22+
path = third_party/libdrm/src
23+
url = https://chromium.googlesource.com/chromiumos/third_party/libdrm
24+
gclient-condition = dawn_standalone and host_os == "linux"
2125
[submodule "build"]
2226
path = build
2327
url = https://chromium.googlesource.com/chromium/src/build

DEPS

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,25 @@ deps = {
117117
'condition': 'dawn_standalone',
118118
},
119119

120+
# Required by //build on Linux
121+
'third_party/libdrm/src': {
122+
'url': '{chromium_git}/chromiumos/third_party/libdrm.git@ad78bb591d02162d3b90890aa4d0a238b2a37cde',
123+
'condition': 'dawn_standalone and host_os == "linux"',
124+
},
125+
120126
# Dependencies required to use GN, Clang, and Rust in standalone.
121127
# The //build, //tools/clang, and //tools/rust deps should all be updated
122128
# in unison, as there are dependencies between them.
123129
'build': {
124-
'url': '{chromium_git}/chromium/src/build@a6c1c751fd8c18d9e051b12600aec2753c1712c3',
130+
'url': '{chromium_git}/chromium/src/build@9d5c32282de17517d92763af2d11dbeb1f6539aa',
125131
'condition': 'dawn_standalone',
126132
},
127133
'tools/clang': {
128-
'url': '{chromium_git}/chromium/src/tools/clang@06a29b5bbf392c68d73dc8df9015163cc5a98c40',
134+
'url': '{chromium_git}/chromium/src/tools/clang@53554bf3da41153f2e01f9ff234c194c156b7a93',
129135
'condition': 'dawn_standalone',
130136
},
131137
'tools/rust': {
132-
'url': '{chromium_git}/chromium/src/tools/rust@a69a8ecdbf7a19fb129ae57650cac9f704cb7cf9',
138+
'url': '{chromium_git}/chromium/src/tools/rust@ed0fe5c0e067bd64ab43eb7457e71680a81bd8e3',
133139
'condition': 'dawn_standalone and checkout_rust',
134140
},
135141
'tools/clang/dsymutil': {
@@ -243,7 +249,7 @@ deps = {
243249
'condition': 'dawn_standalone',
244250
},
245251
'third_party/google_benchmark/src': {
246-
'url': '{chromium_git}/external/github.com/google/benchmark.git' + '@' + 'efc89f0b524780b1994d5dddd83a92718e5be492',
252+
'url': '{chromium_git}/external/github.com/google/benchmark.git' + '@' + '761305ec3b33abf30e08d50eb829e19a802581cc',
247253
'condition': 'dawn_standalone',
248254
},
249255

build

Submodule build updated from a6c1c75 to 9d5c322

generator/templates/api_cpp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ class {{OptionalBoolCppType}} {
189189
}
190190

191191
// Comparison functions.
192-
bool operator==({{OptionalBoolCType}} rhs) const {
193-
return mValue == rhs;
192+
friend bool operator==(const {{OptionalBoolCppType}}& lhs, const {{OptionalBoolCppType}}& rhs) {
193+
return lhs.mValue == rhs.mValue;
194194
}
195-
bool operator!=({{OptionalBoolCType}} rhs) const {
196-
return mValue != rhs;
195+
friend bool operator!=(const {{OptionalBoolCppType}}& lhs, const {{OptionalBoolCppType}}& rhs) {
196+
return lhs.mValue != rhs.mValue;
197197
}
198198

199199
private:

src/dawn/node/interop/Core.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ class PromiseBase {
215215
inline operator Napi::Promise() const { return state_->deferred.Promise(); }
216216

217217
// Comparison operator between promises
218-
bool operator==(const PromiseBase& other) { return state_ == other.state_; }
219-
bool operator!=(const PromiseBase& other) { return !(*this == other); }
218+
friend bool operator==(const PromiseBase& lhs, const PromiseBase& rhs) {
219+
return lhs.state_ == rhs.state_;
220+
}
221+
friend bool operator!=(const PromiseBase& lhs, const PromiseBase& rhs) { return !(lhs == rhs); }
220222

221223
// Reject() rejects the promise with the given failure value.
222224
void Reject(Napi::Value value) const {

src/tint/lang/spirv/reader/ast_lower/atomics.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,15 +262,15 @@ struct Atomics::State {
262262
for (auto* node : ctx.src->ASTNodes().Objects()) {
263263
if (auto* load = ctx.src->Sem().Get<sem::Load>(node)) {
264264
if (is_ref_to_atomic_var(load->Source())) {
265-
ctx.Replace(load->Source()->Declaration(), [=] {
265+
ctx.Replace(load->Source()->Declaration(), [load, this] {
266266
auto* expr = ctx.CloneWithoutTransform(load->Source()->Declaration());
267267
return b.Call(wgsl::BuiltinFn::kAtomicLoad, b.AddressOf(expr));
268268
});
269269
}
270270
} else if (auto* assign = node->As<ast::AssignmentStatement>()) {
271271
auto* sem_lhs = ctx.src->Sem().GetVal(assign->lhs);
272272
if (is_ref_to_atomic_var(sem_lhs)) {
273-
ctx.Replace(assign, [=] {
273+
ctx.Replace(assign, [assign, this] {
274274
auto* lhs = ctx.CloneWithoutTransform(assign->lhs);
275275
auto* rhs = ctx.CloneWithoutTransform(assign->rhs);
276276
auto* call = b.Call(wgsl::BuiltinFn::kAtomicStore, b.AddressOf(lhs), rhs);

src/tint/lang/spirv/reader/ast_parser/function.cc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ void FunctionEmitter::PushGuard(const std::string& guard_name, uint32_t end_id)
886886
auto* cond = builder_.Expr(Source{}, guard_name);
887887
auto* builder = AddStatementBuilder<IfStatementBuilder>(cond);
888888

889-
PushNewStatementBlock(top.GetConstruct(), end_id, [=](const StatementList& stmts) {
889+
PushNewStatementBlock(top.GetConstruct(), end_id, [builder, this](const StatementList& stmts) {
890890
builder->body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
891891
});
892892
}
@@ -898,7 +898,7 @@ void FunctionEmitter::PushTrueGuard(uint32_t end_id) {
898898
auto* cond = MakeTrue(Source{});
899899
auto* builder = AddStatementBuilder<IfStatementBuilder>(cond);
900900

901-
PushNewStatementBlock(top.GetConstruct(), end_id, [=](const StatementList& stmts) {
901+
PushNewStatementBlock(top.GetConstruct(), end_id, [builder, this](const StatementList& stmts) {
902902
builder->body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
903903
});
904904
}
@@ -2927,7 +2927,7 @@ bool FunctionEmitter::EmitIfStart(const BlockInfo& block_info) {
29272927
// But make sure we do it in the right order.
29282928
auto push_else = [this, builder, else_end, construct, false_is_break, false_is_continue] {
29292929
// Push the else clause onto the stack first.
2930-
PushNewStatementBlock(construct, else_end, [=](const StatementList& stmts) {
2930+
PushNewStatementBlock(construct, else_end, [builder, this](const StatementList& stmts) {
29312931
// Only set the else-clause if there are statements to fill it.
29322932
if (!stmts.IsEmpty()) {
29332933
// The "else" consists of the statement list from the top of
@@ -2978,7 +2978,7 @@ bool FunctionEmitter::EmitIfStart(const BlockInfo& block_info) {
29782978
}
29792979

29802980
// Push the then clause onto the stack.
2981-
PushNewStatementBlock(construct, then_end, [=](const StatementList& stmts) {
2981+
PushNewStatementBlock(construct, then_end, [builder, this](const StatementList& stmts) {
29822982
builder->body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
29832983
});
29842984
if (true_is_break) {
@@ -3091,10 +3091,11 @@ bool FunctionEmitter::EmitSwitchStart(const BlockInfo& block_info) {
30913091
// for the case, and fill the case clause once the block is generated.
30923092
auto case_idx = swch->cases.Length();
30933093
swch->cases.Push(nullptr);
3094-
PushNewStatementBlock(construct, end_id, [=](const StatementList& stmts) {
3095-
auto* body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
3096-
swch->cases[case_idx] = create<ast::CaseStatement>(Source{}, selectors, body);
3097-
});
3094+
PushNewStatementBlock(
3095+
construct, end_id, [swch, case_idx, selectors, this](const StatementList& stmts) {
3096+
auto* body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
3097+
swch->cases[case_idx] = create<ast::CaseStatement>(Source{}, selectors, body);
3098+
});
30983099

30993100
if (i == 0) {
31003101
break;
@@ -3106,9 +3107,10 @@ bool FunctionEmitter::EmitSwitchStart(const BlockInfo& block_info) {
31063107

31073108
bool FunctionEmitter::EmitLoopStart(const Construct* construct) {
31083109
auto* builder = AddStatementBuilder<LoopStatementBuilder>();
3109-
PushNewStatementBlock(construct, construct->end_id, [=](const StatementList& stmts) {
3110-
builder->body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
3111-
});
3110+
PushNewStatementBlock(
3111+
construct, construct->end_id, [builder, this](const StatementList& stmts) {
3112+
builder->body = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
3113+
});
31123114
return success();
31133115
}
31143116

@@ -3121,7 +3123,7 @@ bool FunctionEmitter::EmitContinuingStart(const Construct* construct) {
31213123
return Fail() << "internal error: starting continue construct, "
31223124
"expected loop on top of stack";
31233125
}
3124-
PushNewStatementBlock(construct, construct->end_id, [=](const StatementList& stmts) {
3126+
PushNewStatementBlock(construct, construct->end_id, [loop, this](const StatementList& stmts) {
31253127
loop->continuing = create<ast::BlockStatement>(Source{}, stmts, tint::Empty);
31263128
});
31273129

third_party/google_benchmark/BUILD.gn

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
import("//build_overrides/build.gni")
6-
75
config("benchmark_config") {
86
include_dirs = [ "src/include" ]
97

@@ -64,10 +62,8 @@ component("google_benchmark") {
6462

6563
all_dependent_configs = [ ":benchmark_config" ]
6664

67-
if (build_with_chromium) {
68-
configs -= [ "//build/config/compiler:chromium_code" ]
69-
configs += [ "//build/config/compiler:no_chromium_code" ]
70-
}
65+
configs -= [ "//build/config/compiler:chromium_code" ]
66+
configs += [ "//build/config/compiler:no_chromium_code" ]
7167

7268
if (is_win) {
7369
configs -= [ "//build/config/win:nominmax" ]
@@ -77,9 +73,10 @@ component("google_benchmark") {
7773
"benchmark_EXPORTS=1",
7874

7975
# Tell gtest to always use standard regular expressions.
80-
"HAVE_GNU_POSIX_REGEX=0",
81-
"HAVE_POSIX_REGEX=0",
8276
"HAVE_STD_REGEX=1",
77+
78+
# google_benchmark expects a BENCHMARK_VERSION definition
79+
"BENCHMARK_VERSION=\"1.9.0\"",
8380
]
8481
}
8582

third_party/google_benchmark/src

Submodule src updated 117 files

third_party/libdrm/BUILD.gn

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Copyright 2016 The Chromium Authors
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
assert(is_linux || is_chromeos)
5+
6+
generated_static_table_fourcc_file =
7+
"$target_gen_dir/src/generated_static_table_fourcc.h"
8+
fourcc_file = "src/include/drm/drm_fourcc.h"
9+
10+
action("make_generated_static_table_fourcc") {
11+
script = "src/gen_table_fourcc.py"
12+
args = [
13+
rebase_path(fourcc_file, root_build_dir),
14+
rebase_path(generated_static_table_fourcc_file),
15+
]
16+
outputs = [ generated_static_table_fourcc_file ]
17+
inputs = [ fourcc_file ]
18+
}
19+
20+
config("libdrm_config") {
21+
# TODO(thomasanderson): Remove this hack once
22+
# https://patchwork.kernel.org/patch/10545295/ lands.
23+
defines = [ "typeof(x)=__typeof__(x)" ]
24+
25+
include_dirs = [
26+
"src",
27+
"src/include",
28+
"src/include/drm",
29+
]
30+
31+
# libdrm uses macros defined by <sys/types.h> which are being moved to
32+
# <sys/sysmacros.h>. GLIBC headers give a pragma warning in this case.
33+
# Suppress this warning for now. This may be removed once
34+
# https://patchwork.kernel.org/patch/9628231/ lands.
35+
cflags = [ "-Wno-#pragma-messages" ]
36+
37+
# glibc version >= 2.25 explicitly include <sys/sysmacros.h>
38+
cflags += [ "-DMAJOR_IN_SYSMACROS=1" ]
39+
40+
# TODO(b/357680612): unused function 'swap32'.
41+
cflags += [ "-Wno-unused-function" ]
42+
43+
if (is_clang) {
44+
cflags += [
45+
"-Wno-enum-conversion",
46+
47+
# TODO(crbug.com/932060) fix unused result from asprintf in modetest.c.
48+
"-Wno-unused-result",
49+
50+
# modetest.c has an improper conversion in a printf statement.
51+
"-Wno-format",
52+
]
53+
}
54+
}
55+
56+
static_library("libdrm") {
57+
sources = [
58+
"src/xf86drm.c",
59+
"src/xf86drmHash.c",
60+
"src/xf86drmMode.c",
61+
"src/xf86drmRandom.c",
62+
]
63+
64+
deps = [ ":make_generated_static_table_fourcc" ]
65+
66+
include_dirs = [
67+
get_path_info(generated_static_table_fourcc_file, "dir"),
68+
"src",
69+
"src/include",
70+
]
71+
configs -= [ "//build/config/compiler:chromium_code" ]
72+
configs += [ "//build/config/compiler:no_chromium_code" ]
73+
cflags = [
74+
# xf86drm.c uses readdir_r, which has been deprecated as of
75+
# glibc-2.24. This causes a build error when using the Debian
76+
# Stretch sysroot.
77+
"-Wno-deprecated-declarations",
78+
]
79+
80+
public_configs = [ ":libdrm_config" ]
81+
}
82+
83+
executable("modetest") {
84+
sources = [
85+
"src/tests/modetest/buffers.c",
86+
"src/tests/modetest/buffers.h",
87+
"src/tests/modetest/cursor.c",
88+
"src/tests/modetest/cursor.h",
89+
"src/tests/modetest/modetest.c",
90+
"src/tests/util/common.h",
91+
"src/tests/util/format.c",
92+
"src/tests/util/format.h",
93+
"src/tests/util/kms.c",
94+
"src/tests/util/kms.h",
95+
"src/tests/util/pattern.c",
96+
"src/tests/util/pattern.h",
97+
]
98+
99+
include_dirs = [
100+
"src/tests",
101+
"src/tests/modetest",
102+
]
103+
104+
configs -= [ "//build/config/compiler:chromium_code" ]
105+
configs += [ "//build/config/compiler:no_chromium_code" ]
106+
configs += [ ":libdrm_config" ]
107+
108+
deps = [ ":libdrm" ]
109+
}

0 commit comments

Comments
 (0)