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

iOS,macOS: Add Obj-C cflags to all Obj-C targets - #56386

Merged
auto-submit[bot] merged 2 commits into
flutter-team-archive:mainfrom
cbracken:arc-gn-config
Nov 6, 2024
Merged

auto-submit[bot] merged 2 commits into
flutter-team-archive:mainfrom
cbracken:arc-gn-config

Conversation

@cbracken

@cbracken cbracken commented Nov 5, 2024 •

Copy link
Copy Markdown
Contributor

Ensure that all Objective-C code in the codebase is being built with the standard set of Flutter Objective-C compiler flags with ARC enabled.

Also bumps the cflags config up to the top of the first block within each target in which Objective-C sources appear, so that the location is consistent.

Migrates The following targets to ARC, which had been missed in previous passes since they didn't declare the standard Flutter Obj-C[++] cflags:

  • //flutter/fml:fml_unittests
  • //flutter/impeller/golden_tests:metal_screenshot
  • //flutter/impeller/playground:playground
  • //flutter/impeller/backend/metal:metal
  • //flutter/impeller/backend/metal:metal_unittests
  • //shell/gpu:gpu_surface_metal_unittests
  • //flutter/shell/platform/embedder:embedder_unittests

This patch includes no semantic changes.

Issue: flutter/flutter#137801

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Comment thread fml/BUILD.gn
]

if (is_mac) {
if (is_mac || is_ios) {

@cbracken cbracken Nov 5, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: making consistent with the associated conditional in the target above that this one is testing.

void* texture) {
GrMtlTextureInfo info;
info.fTexture.reset([(id<MTLTexture>)texture retain]);
info.fTexture.retain(texture);

@cbracken cbracken Nov 5, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the non-arc code! Doesn't need a bridge cast since this is already void*.

Comment thread impeller/BUILD.gn

if (impeller_enable_metal) {
deps += [ "//flutter/impeller/renderer/backend/metal:metal_unittests" ]
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to build these guys on windows, linux, or custom embedders for platforms without metal enabled.

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 5, 2024
Comment thread impeller/BUILD.gn
"core:allocator_unittests",
"display_list:skia_conversions_unittests",
"geometry:geometry_unittests",
"renderer/backend/metal:metal_unittests",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How was this passing if impeller_enable_metal was false?

@auto-submit

auto-submit Bot commented Nov 5, 2024

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/engine/56386, due to - The status or check suite Mac mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 5, 2024
Ensure that all Objective-C code in the codebase are being built with
the standard set of Flutter Objective-C compiler flags with ARC enabled.

Also bumps the cflags config up to the top of the first block within
each target in which Objective-C sources appear, so that the location is
consistent.

Issue: flutter/flutter#137801
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 6, 2024
@auto-submit
auto-submit Bot merged commit 3df1546 into flutter-team-archive:main Nov 6, 2024
auto-submit Bot pushed a commit to flutter/flutter that referenced this pull request Nov 6, 2024
flutter-team-archive/engine@58ac1da...b36ca33

2024-11-06 [email protected] [skwasm] Fix empty backdrop drawing. (flutter-team-archive/engine#56385)
2024-11-06 [email protected] [Impeller] generate stroke vertices into point arena. (flutter-team-archive/engine#56390)
2024-11-06 [email protected] [Impeller] Do not capture the temporary ImpellerMapping struct pointer when storing release callbacks in libImpeller (flutter-team-archive/engine#56411)
2024-11-06 6844906[email protected] Roll ICU from 9408c6fd4a39 to 4239b1559d11 (2 revisions) (flutter-team-archive/engine#56407)
2024-11-06 [email protected] iOS,macOS: Add Obj-C cflags to all Obj-C targets (flutter-team-archive/engine#56386)
2024-11-06 [email protected] Roll Skia from afaed8923682 to cf33c4e96e81 (5 revisions) (flutter-team-archive/engine#56408)
2024-11-06 [email protected] Manual roll Dart SDK from 1c1d0420539f to d456f613465a (6 revisions) (flutter-team-archive/engine#56406)
2024-11-06 [email protected] [Impeller] Avoid errors due to triangle fans usage on Molten. (flutter-team-archive/engine#56321)
2024-11-06 [email protected] Roll Skia from b4df8dda7ffc to afaed8923682 (14 revisions) (flutter-team-archive/engine#56404)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@cbracken
cbracken deleted the arc-gn-config branch November 28, 2024 16:31
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
…e/engine#56386)

Ensure that all Objective-C code in the codebase is being built with the standard set of Flutter Objective-C compiler flags with ARC enabled.

Also bumps the cflags config up to the top of the first block within each target in which Objective-C sources appear, so that the location is consistent.

Migrates The following targets to ARC, which had been missed in previous passes since they didn't declare the standard Flutter Obj-C[++] cflags:
* `//flutter/fml:fml_unittests`
* `//flutter/impeller/golden_tests:metal_screenshot`
* `//flutter/impeller/playground:playground`
* `//flutter/impeller/backend/metal:metal`
* `//flutter/impeller/backend/metal:metal_unittests`
* `//shell/gpu:gpu_surface_metal_unittests`
* `//flutter/shell/platform/embedder:embedder_unittests`

This patch includes no semantic changes.

Issue: flutter#137801

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: desktop autosubmit Merge PR when tree becomes green via auto submit App e: impeller platform-ios platform-macos

Development

Successfully merging this pull request may close these issues.

4 participants