Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows plugin's CMake should have a FLUTTER_TARGET_PLATFORM variable set (like Linux) #116196

Closed
GregoryConrad opened this issue Nov 29, 2022 · 2 comments
Labels
a: desktop Running on desktop c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-windows Building on or for Windows specifically r: fixed Issue is closed as already fixed in a newer version team-windows Owned by the Windows platform team tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@GregoryConrad
Copy link
Contributor

Use case

Once Windows ARM is supported (#53120), there will be two supported Windows platforms (windows-x64 and windows-arm64). When making an FFI plugin that uses a unique build process (e.g. Rust), it is necessary to know the target platform to include architecture-specific dynamic libraries (.so/.dll).

Proposal

Add the FLUTTER_TARGET_PLATFORM variable to Windows CMake (just like Linux's right now). Even if it is just a placeholder for windows-x64 for now, it will make migration to Windows ARM easier in the future. For reference, here are the two possible values for FLUTTER_TARGET_PLATFORM on linux right now (afaik):

  • linux-arm64
  • linux-x64

(Which appear to map pretty closely to the Dart ABIs.)

@danagbemava-nc danagbemava-nc added in triage Presently being triaged by the triage team c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. platform-windows Building on or for Windows specifically c: proposal A detailed proposal for a change to Flutter and removed in triage Presently being triaged by the triage team labels Nov 30, 2022
@loic-sharma loic-sharma added a: desktop Running on desktop P3 Issues that are less important to the Flutter project labels Mar 7, 2023
loic-sharma pushed a commit to flutter/website that referenced this issue Mar 28, 2023
Adds a link to Pierrick Bouvier's design doc for Windows arm64 support.

Related issue: flutter/flutter#62597
Related issue: flutter/flutter#116196
loic-sharma pushed a commit that referenced this issue Aug 31, 2023
To implement windows-arm64 support, it is needed to add architecture as a subdirectory (#129805).

In short, when performing a flutter windows build, we have:
- Before: build/windows/runner/Release/gallery.exe
- After: build/windows/x64/runner/Release/gallery.exe

This convention follows what flutter linux build does.

Addresses: #129805
Addresses: #116196

Design doc: [flutter.dev/go/windows-arm64](https://flutter.dev/go/windows-arm64)
@loic-sharma
Copy link
Member

Added by #131843 as part of #62597

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
@cbracken cbracken added team-windows Owned by the Windows platform team and removed team-desktop labels Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-windows Building on or for Windows specifically r: fixed Issue is closed as already fixed in a newer version team-windows Owned by the Windows platform team tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants