Skip to content

Commit

Permalink
Roll clang with fix for ABI change
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderso committed Aug 22, 2023
1 parent 4542284 commit 57ea3f3
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ vars = {
# The list of revisions for these tools comes from Fuchsia, here:
# https://fuchsia.googlesource.com/integration/+/HEAD/toolchain
# If there are problems with the toolchain, contact fuchsia-toolchain@.
'clang_version': 'git_revision:6d667d4b261e81f325756fdfd5bb43b3b3d2451d',
'clang_version': 'git_revision:020d2fb7711d70e296f19d83565f8d93d2cfda71',

# The goma version and the clang version can be tightly coupled. If goma
# stops working on a clang roll, this may need to be updated using the value
Expand Down
2 changes: 2 additions & 0 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,7 @@ ORIGIN: ../../../flutter/shell/platform/common/text_editing_delta.h + ../../../f
ORIGIN: ../../../flutter/shell/platform/common/text_input_model.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/common/text_input_model.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/common/text_range.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/shell/platform/darwin/common/command_line.h + ../../../flutter/LICENSE
Expand Down Expand Up @@ -5316,6 +5317,7 @@ FILE: ../../../flutter/shell/platform/common/text_editing_delta.h
FILE: ../../../flutter/shell/platform/common/text_input_model.cc
FILE: ../../../flutter/shell/platform/common/text_input_model.h
FILE: ../../../flutter/shell/platform/common/text_range.h
FILE: ../../../flutter/shell/platform/darwin/common/availability_version_check.cc
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.h
FILE: ../../../flutter/shell/platform/darwin/common/buffer_conversions.mm
FILE: ../../../flutter/shell/platform/darwin/common/command_line.h
Expand Down
1 change: 1 addition & 0 deletions shell/platform/darwin/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ source_set("common") {
cflags_objcc = flutter_cflags_objcc

sources = [
"availability_version_check.cc",
"buffer_conversions.h",
"buffer_conversions.mm",
"command_line.h",
Expand Down
42 changes: 42 additions & 0 deletions shell/platform/darwin/common/availability_version_check.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <dispatch/dispatch.h>
#include <dlfcn.h>
#include <cstdint>

#include "flutter/fml/logging.h"

namespace {

typedef uint32_t dyld_platform_t;

typedef struct {
dyld_platform_t platform;
uint32_t version;
} dyld_build_version_t;

typedef bool (*AvailabilityVersionCheckFn)(uint32_t count,
dyld_build_version_t versions[]);

AvailabilityVersionCheckFn AvailabilityVersionCheck;

dispatch_once_t DispatchOnceCounter;

void InitializeAvailabilityCheck(void* unused) {
if (AvailabilityVersionCheck) {
return;
}
AvailabilityVersionCheck = reinterpret_cast<AvailabilityVersionCheckFn>(
dlsym(RTLD_DEFAULT, "_availability_version_check"));
FML_CHECK(AvailabilityVersionCheck);
}

extern "C" bool _availability_version_check(uint32_t count,
dyld_build_version_t versions[]) {
dispatch_once_f(&DispatchOnceCounter, NULL, InitializeAvailabilityCheck);
return AvailabilityVersionCheck(count, versions);
}

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ - (BOOL)handleOpenURLs:(NSArray<NSURL*>*)urls {
[[AppDelegateTestFlutterAppLifecycleDelegate alloc] init];
[appDelegate addApplicationLifecycleDelegate:delegate];

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

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

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

EXPECT_EQ([firstDelegate receivedURLs], URLs);
Expand Down

0 comments on commit 57ea3f3

Please sign in to comment.