Skip to content

Commit 8469ce0

Browse files
committed
Roll clang to 07d67299a15ce03b053736e2d31a668ee0576987
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. Also works around an unused variable warnings in Fuchsia's binding_set.h until it's fixed upstream in Fuchsia. 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: flutter#192609
1 parent c0f8038 commit 8469ce0

5 files changed

Lines changed: 35 additions & 3 deletions

File tree

‎DEPS‎

Lines changed: 1 addition & 1 deletion
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

‎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) {
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/impeller/renderer/backend/gles/test/mock_gles.cc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "GLES3/gl3.h"
88
#include "fml/logging.h"
9+
#include "impeller/base/thread_safety.h"
910
#include "impeller/renderer/backend/gles/proc_table_gles.h"
1011
#include "impeller/renderer/backend/gles/test/mock_gles.h"
1112

@@ -469,7 +470,7 @@ static_assert(CheckSameSignature<decltype(mockVertexAttribDivisor), //
469470
decltype(glVertexAttribDivisor)>::value);
470471

471472
// static
472-
std::shared_ptr<MockGLES> MockGLES::Init(
473+
IPLR_NO_THREAD_SAFETY_ANALYSIS std::shared_ptr<MockGLES> MockGLES::Init(
473474
std::unique_ptr<MockGLESImpl> impl,
474475
const std::optional<std::vector<const char*>>& extensions,
475476
const char* version_string) {
@@ -490,7 +491,7 @@ std::shared_ptr<MockGLES> MockGLES::Init(
490491
return mock_gles;
491492
}
492493

493-
std::shared_ptr<MockGLES> MockGLES::Init(
494+
IPLR_NO_THREAD_SAFETY_ANALYSIS std::shared_ptr<MockGLES> MockGLES::Init(
494495
const std::optional<std::vector<const char*>>& extensions,
495496
const char* version_string,
496497
ProcTableGLES::Resolver resolver) {

‎engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_test_component_controller.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@
1414
#include <lib/async/cpp/wait.h>
1515
#include <lib/fdio/namespace.h>
1616
#include <lib/fidl/cpp/binding.h>
17+
// TODO(cbracken): https://github.com/flutter/flutter/issues/192609
18+
// Remove once the Fuchsia SDK marks bindings_local as maybe_unused in
19+
// BindingSet::CloseAll.
20+
#pragma clang diagnostic push
21+
#pragma clang diagnostic ignored "-Wunused-variable"
1722
#include <lib/fidl/cpp/binding_set.h>
23+
#pragma clang diagnostic pop
1824
#include <lib/sys/cpp/component_context.h>
1925
#include <lib/sys/cpp/service_directory.h>
2026
#include <lib/zx/timer.h>

0 commit comments

Comments
 (0)