Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7b645cb

Browse files
committed
Roll clang with fix for ABI change
1 parent a9b0078 commit 7b645cb

File tree

5 files changed

+52
-3
lines changed

5 files changed

+52
-3
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ vars = {
3939
# The list of revisions for these tools comes from Fuchsia, here:
4040
# https://fuchsia.googlesource.com/integration/+/HEAD/toolchain
4141
# If there are problems with the toolchain, contact fuchsia-toolchain@.
42-
'clang_version': 'git_revision:6d667d4b261e81f325756fdfd5bb43b3b3d2451d',
42+
'clang_version': 'git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71',
4343

4444
# The goma version and the clang version can be tightly coupled. If goma
4545
# stops working on a clang roll, this may need to be updated using the value

ci/licenses_golden/licenses_flutter

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,6 +2572,7 @@ ORIGIN: ../../../flutter/shell/platform/common/text_editing_delta.h + ../../../f
25722572
ORIGIN: ../../../flutter/shell/platform/common/text_input_model.cc + ../../../flutter/LICENSE
25732573
ORIGIN: ../../../flutter/shell/platform/common/text_input_model.h + ../../../flutter/LICENSE
25742574
ORIGIN: ../../../flutter/shell/platform/common/text_range.h + ../../../flutter/LICENSE
2575+
ORIGIN: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc + ../../../flutter/LICENSE
25752576
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h + ../../../flutter/LICENSE
25762577
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm + ../../../flutter/LICENSE
25772578
ORIGIN: ../../../flutter/shell/platform/darwin/common/command_line.h + ../../../flutter/LICENSE
@@ -5316,6 +5317,7 @@ FILE: ../../../flutter/shell/platform/common/text_editing_delta.h
53165317
FILE: ../../../flutter/shell/platform/common/text_input_model.cc
53175318
FILE: ../../../flutter/shell/platform/common/text_input_model.h
53185319
FILE: ../../../flutter/shell/platform/common/text_range.h
5320+
FILE: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc
53195321
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h
53205322
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm
53215323
FILE: ../../../flutter/shell/platform/darwin/common/command_line.h

shell/platform/darwin/common/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source_set("common") {
1313
cflags_objcc = flutter_cflags_objcc
1414

1515
sources = [
16+
"availability_version_check.cc",
1617
"buffer_conversions.h",
1718
"buffer_conversions.mm",
1819
"command_line.h",
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
#include <dispatch/dispatch.h>
6+
#include <dlfcn.h>
7+
#include <cstdint>
8+
9+
#include "flutter/fml/logging.h"
10+
11+
namespace {
12+
13+
typedef uint32_t dyld_platform_t;
14+
15+
typedef struct {
16+
dyld_platform_t platform;
17+
uint32_t version;
18+
} dyld_build_version_t;
19+
20+
typedef bool (*AvailabilityVersionCheckFn)(uint32_t count,
21+
dyld_build_version_t versions[]);
22+
23+
AvailabilityVersionCheckFn AvailabilityVersionCheck;
24+
25+
dispatch_once_t DispatchOnceCounter;
26+
27+
void InitializeAvailabilityCheck(void* unused) {
28+
if (AvailabilityVersionCheck) {
29+
return;
30+
}
31+
AvailabilityVersionCheck = reinterpret_cast<AvailabilityVersionCheckFn>(
32+
dlsym(RTLD_DEFAULT, "_availability_version_check"));
33+
FML_CHECK(AvailabilityVersionCheck);
34+
}
35+
36+
extern "C" bool _availability_version_check(uint32_t count,
37+
dyld_build_version_t versions[]) {
38+
dispatch_once_f(&DispatchOnceCounter, NULL, InitializeAvailabilityCheck);
39+
return AvailabilityVersionCheck(count, versions);
40+
}
41+
42+
} // namespace

shell/platform/darwin/macos/framework/Source/FlutterAppDelegateTest.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ - (BOOL)handleOpenURLs:(NSArray<NSURL*>*)urls {
4646
[[AppDelegateTestFlutterAppLifecycleDelegate alloc] init];
4747
[appDelegate addApplicationLifecycleDelegate:delegate];
4848

49-
NSArray<NSURL*>* URLs = @[ [NSURL URLWithString:@"https://flutter.dev"] ];
49+
NSURL* URL = [NSURL URLWithString:@"https://flutter.dev"];
50+
EXPECT_NE(URL, nil);
51+
NSArray<NSURL*>* URLs = @[ URL ];
5052
[appDelegate application:NSApplication.sharedApplication openURLs:URLs];
5153

5254
EXPECT_EQ([delegate receivedURLs], URLs);
@@ -61,7 +63,9 @@ - (BOOL)handleOpenURLs:(NSArray<NSURL*>*)urls {
6163
[appDelegate addApplicationLifecycleDelegate:firstDelegate];
6264
[appDelegate addApplicationLifecycleDelegate:secondDelegate];
6365

64-
NSArray<NSURL*>* URLs = @[ [NSURL URLWithString:@"https://flutter.dev"] ];
66+
NSURL* URL = [NSURL URLWithString:@"https://flutter.dev"];
67+
EXPECT_NE(URL, nil);
68+
NSArray<NSURL*>* URLs = @[ URL ];
6569
[appDelegate application:NSApplication.sharedApplication openURLs:URLs];
6670

6771
EXPECT_EQ([firstDelegate receivedURLs], URLs);

0 commit comments

Comments
 (0)