Skip to content

Commit 2553f89

Browse files
authored
Roll clang to 07d67299a15ce03b053736e2d31a668ee0576987 (#192607)
This rolls clang to pick up llvm/llvm-project@b8007a8 Xcode 27 Release Candidate 1 includes a new target architecture in the MacOS SDK .tbd stub files: `arm64e.x1`. The linker in our toolchain errors out, complaining about the unknown architecture and claiming the .tbd is malformed. The fix was landed in the above clang commit. This rolls the updated Fuchsia clang toolchain with the upstream fix. ``` ld64.lld: error: could not load TAPI file at ../../flutter/prebuilts/SDKs/MacOSX27.0.sdk/usr/lib/libSystem.tbd: malformed file ./engine/src/flutter/prebuilts/SDKs/MacOSX27.0.sdk/usr/lib/libSystem.tbd:4:20: error: unknown architecture arm64e.x1-macos, arm64e.x1-maccatalyst ] ^~~~~~~~~~~~~~~ ``` It's been above six months since the last roll. Clang now catches two new unused identifier warnings (which we promote to errors) in Skia: * `SkSL::Program::ElementsCollection::iterator::fOwnedEnd` in `src/sksl/ir/SkSLProgram.h:113` identified due to `-Wunused-private-field`. Assigned in the iterator's ctor init list at line 110 but never read. * `skia::textlayout::ParagraphImpl::getEllipsis()` contains an unused local `ellipsis16` at `modules/skparagraph/src/ParagraphImpl.cpp:1090` identified due to `-Wunused-variable`; the `else` branch calls `fParagraphStyle.getEllipsisUtf16()` again instead of using it. I've added Skia-specific suppression for those two, and a TODO. I'll send patches upstream to clean these up. Once they land and Skia rolls back in, we'll remove the suppression. This also triggers a warning about `g_test_lock` acquired in `MockGLES::Init`. This is test-only code either way, but the mutex is always released in the dtor so the code as written is safe. Added an annotation to silence that warning. Issue: #192609 <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant in-code documentation (doc comments with `///`). - [X] If this PR introduces a new feature or capability, I created and linked a website documentation issue or PR in [flutter/website] (or verified none is needed). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [AI contribution guidelines]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [flutter/website]: https://github.com/flutter/website [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent 4557081 commit 2553f89

40 files changed

Lines changed: 360 additions & 270 deletions

‎DEPS‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ vars = {
3939
# updates to Clang Tidy will not turn the tree red.
4040
#
4141
# See https://github.com/flutter/flutter/wiki/Engine-pre‐submits-and-post‐submits#post-submit
42-
'clang_version': 'git_revision:80743bd43fd5b38fedc503308e7a652e23d3ec93',
42+
'clang_version': 'git_revision:07d67299a15ce03b053736e2d31a668ee0576987',
4343

4444
'reclient_version': 're_client_version:0.185.0.db415f21-gomaip',
4545

@@ -794,7 +794,7 @@ deps = {
794794
'packages': [
795795
{
796796
'package': 'flutter_internal/rbe/reclient_cfgs',
797-
'version': '0vARzGeIZgIhW7zVfWuqIPQ_HXMLDccjAstykWZKjaEC',
797+
'version': 'Vk7WiSKwQdBHbCrZ9PtRl3po2WpRFQZSag9M6-sxF_0C',
798798
}
799799
],
800800
'condition': 'use_rbe',

‎engine/src/build/config/BUILDCONFIG.gn‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,10 @@ if (!is_component_build) {
532532
}
533533
}
534534

535+
# Applied by Skia's skia_* target templates. See
536+
# //flutter/third_party/skia/gn/skia.gni.
537+
skia_target_default_configs = [ "//flutter/build/config/skia:warnings" ]
538+
535539
# Test defaults.
536540
set_defaults("test") {
537541
if (is_android) {

‎engine/src/build/config/compiler/BUILD.gn‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,12 @@ config("runtime_library") {
637637
"-I" + _libcxxabi_include,
638638
]
639639

640-
# Unwind seemes to be in these libraries in Linux.
641-
if (!is_linux) {
642-
ldflags += [ "-nostdlib++" ]
640+
ldflags += [ "-nostdlib++" ]
641+
642+
if (is_linux) {
643+
# Our custom libcxx doesn't include the unwinder, which is included in
644+
# libc++.a. Link the libunwind directly.
645+
ldflags += [ "--unwindlib=libunwind" ]
643646
}
644647
}
645648

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
# Applied to Skia's targets only, via skia_target_default_configs in
6+
# //build/config/BUILDCONFIG.gn.
7+
config("warnings") {
8+
cflags = []
9+
10+
if (is_fuchsia && is_clang) {
11+
# Dead declarations in Skia that only warn against the libc++ headers
12+
# bundled in the Fuchsia toolchain.
13+
#
14+
# Remove once fixed upstream in Skia.
15+
# TODO(cbracken): https://github.com/flutter/flutter/issues/192609
16+
cflags += [
17+
"-Wno-unused-private-field",
18+
"-Wno-unused-variable",
19+
]
20+
}
21+
}

‎engine/src/flutter/build/secondary/flutter/third_party/libcxxabi/BUILD.gn‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,17 @@ source_set("libcxxabi") {
4141
configs += [ "//flutter/third_party/libcxx:src_include" ]
4242

4343
# No translation units in the engine are built with exceptions. But, using
44-
# Objective-C exceptions requires some infrastructure setup for exceptions.
45-
# Build support for the same in cxxabi on Darwin.
46-
if (is_mac || is_ios) {
44+
# Objective-C exceptions requires some infrastructure setup for exceptions,
45+
# as do the sanitizer runtimes on Linux, which reference __cxa_begin_catch
46+
# and __gxx_personality_v0. Build support for the same in cxxabi there.
47+
if (is_mac || is_ios || is_linux) {
4748
configs -= [ "//build/config/gcc:no_exceptions" ]
4849
sources += [
4950
"src/cxa_exception.cpp",
5051
"src/cxa_personality.cpp",
5152
]
5253
} else {
53-
if (!is_tsan) {
54-
sources += [ "src/cxa_noexception.cpp" ]
55-
}
54+
sources += [ "src/cxa_noexception.cpp" ]
5655
}
5756

5857
# Third party dependencies may depend on RTTI. Add support for the same in

‎engine/src/flutter/display_list/display_list_unittests.cc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ TEST_F(DisplayListTest, DisplayListTransformResetHandling) {
11341134

11351135
TEST_F(DisplayListTest, SingleOpsMightSupportGroupOpacityBlendMode) {
11361136
auto run_tests = [](const std::string& name,
1137-
void build(DlCanvas & canvas, const DlPaint& paint),
1137+
void build(DlCanvas& canvas, const DlPaint& paint),
11381138
bool expect_for_op, bool expect_with_kSrc) {
11391139
{
11401140
// First test is the draw op, by itself
@@ -3461,12 +3461,12 @@ TEST_F(DisplayListTest, DrawUnorderedRoundRectPathCCW) {
34613461

34623462
TEST_F(DisplayListTest, NopOperationsOmittedFromRecords) {
34633463
auto run_tests = [](const std::string& name,
3464-
void init(DisplayListBuilder & builder, DlPaint & paint),
3464+
void init(DisplayListBuilder& builder, DlPaint& paint),
34653465
uint32_t expected_op_count = 0u,
34663466
uint32_t expected_total_depth = 0u) {
34673467
auto run_one_test =
34683468
[init](const std::string& name,
3469-
void build(DisplayListBuilder & builder, DlPaint & paint),
3469+
void build(DisplayListBuilder& builder, DlPaint& paint),
34703470
uint32_t expected_op_count = 0u,
34713471
uint32_t expected_total_depth = 0u) {
34723472
DisplayListBuilder builder;

‎engine/src/flutter/display_list/geometry/dl_region_unittests.cc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ TEST(DisplayListRegion, UnionEmpty) {
343343
std::vector<DlIRect> expected{
344344
DlIRect::MakeXYWH(0, 0, 20, 20),
345345
};
346+
EXPECT_EQ(rects, expected);
346347
}
347348
{
348349
DlRegion region1({
@@ -355,6 +356,7 @@ TEST(DisplayListRegion, UnionEmpty) {
355356
std::vector<DlIRect> expected{
356357
DlIRect::MakeXYWH(0, 0, 20, 20),
357358
};
359+
EXPECT_EQ(rects, expected);
358360
}
359361
}
360362

‎engine/src/flutter/display_list/skia/dl_sk_conversions_unittests.cc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,12 @@ TEST(DisplayListSkConversions, MatrixColorFilterModifiesTransparency) {
342342
auto dl_filter = DlColorFilter::MakeMatrix(matrix);
343343
auto sk_filter = ToSk(filter);
344344
auto srgb = SkColorSpace::MakeSRGB();
345-
EXPECT_EQ(dl_filter == nullptr, sk_filter == nullptr);
345+
EXPECT_EQ(dl_filter == nullptr, sk_filter == nullptr) << desc;
346346
EXPECT_EQ(filter.modifies_transparent_black(),
347347
sk_filter && sk_filter->filterColor4f(SkColors::kTransparent,
348348
srgb.get(), srgb.get()) !=
349-
SkColors::kTransparent);
349+
SkColors::kTransparent)
350+
<< desc;
350351
};
351352

352353
// Tests identity (matrix[0] already == 1 in an identity filter)

‎engine/src/flutter/flow/layers/performance_overlay_layer_unittests.cc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ static std::string GetGoldenFilePath(int refresh_rate, bool is_new) {
4545

4646
static void TestPerformanceOverlayLayerGold(int refresh_rate) {
4747
std::string golden_file_path = GetGoldenFilePath(refresh_rate, false);
48-
std::string new_golden_file_path = GetGoldenFilePath(refresh_rate, true);
4948

5049
FixedRefreshRateStopwatch mock_stopwatch(
5150
fml::RefreshRateToFrameBudget(refresh_rate));
@@ -107,6 +106,7 @@ static void TestPerformanceOverlayLayerGold(int refresh_rate) {
107106
#else
108107
const bool golden_data_matches = golden_data->equals(snapshot_data.get());
109108
if (!golden_data_matches) {
109+
std::string new_golden_file_path = GetGoldenFilePath(refresh_rate, true);
110110
SkFILEWStream wstream(new_golden_file_path.c_str());
111111
wstream.write(snapshot_data->data(), snapshot_data->size());
112112
wstream.flush();

‎engine/src/flutter/fml/command_line_unittest.cc‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ TEST(CommandLineTest, OddArguments) {
300300
EXPECT_EQ(std::string(), cl.argv0());
301301
std::vector<CommandLine::Option> expected_options = {
302302
CommandLine::Option("flag", "value")};
303+
EXPECT_EQ(expected_options, cl.options());
303304
std::vector<std::string> expected_positional_args = {"--not-a-flag", "arg",
304305
"--"};
305306
EXPECT_EQ(expected_positional_args, cl.positional_args());
@@ -313,6 +314,7 @@ TEST(CommandLineTest, MultipleOccurrencesOfOption) {
313314
CommandLine::Option("flag1", "value1"),
314315
CommandLine::Option("flag2", "value2"),
315316
CommandLine::Option("flag1", "value3")};
317+
EXPECT_EQ(expected_options, cl.options());
316318
EXPECT_EQ("value3", cl.GetOptionValueWithDefault("flag1", "nope"));
317319
EXPECT_EQ("value2", cl.GetOptionValueWithDefault("flag2", "nope"));
318320
std::vector<std::string_view> values = cl.GetOptionValues("flag1");

0 commit comments

Comments
 (0)