Ignore unguarded-availability for unit test (flutter/engine#44852)

Ignore ungarded-availability for unit test

fixes https://github.com/flutter/flutter/issues/128958

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
Chris Yang
2023-08-25 10:31:30 -07:00
committed by GitHub
parent 843b0a5719
commit 5734f9a52f

View File

@@ -227,6 +227,12 @@ source_set("ios_test_flutter_mrc") {
"-F$platform_frameworks_path",
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
# XCode 15 beta has a bug where iOS 17 API usage is not guarded.
# This bug results engine build failure since the engine treats warnings as errors.
# The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed.
# See details in https://github.com/flutter/flutter/issues/128958.
cflags_objcc = [ "-Wno-unguarded-availability-new" ]
sources = [
"framework/Source/FlutterEnginePlatformViewTest.mm",
"framework/Source/FlutterEngineTest_mrc.mm",
@@ -271,6 +277,12 @@ shared_library("ios_test_flutter") {
"-fobjc-arc",
"-mios-simulator-version-min=$ios_testing_deployment_target",
]
# XCode 15 beta has a bug where iOS 17 API usage is not guarded.
# This bug results engine build failure since the engine treats warnings as errors.
# The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed.
# See details in https://github.com/flutter/flutter/issues/128958.
cflags_objcc = [ "-Wno-unguarded-availability-new" ]
ldflags = [
"-F$platform_frameworks_path",
"-Wl,-install_name,@rpath/Frameworks/libios_test_flutter.dylib",