8000 [Windows] Update the Windows build layout to include the target architecture · Issue #129805 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Windows] Update the Windows build layout to include the target architecture #129805

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

Closed
Tracked by #62597
loic-sharma opened this issue Jun 29, 2023 · 2 comments
Closed
Tracked by #62597
Labels
a: desktop Running on desktop P3 Issues that are less important to the Flutter project platform-windows Building on or for Windows specifically team-windows Owned by the Windows platform team tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@loic-sharma
Copy link
Member
loic-sharma commented Jun 29, 2023

Background

See: https://flutter.dev/go/windows-arm64

Currently, Windows has the following build layout: build/windows/runner/Release/my_app.exe

This assumes an AMD64 target architecture.

Solution

Windows should be updated to have separate build directories for each target architectures. For example:

build/windows/x64/runner/Release/my_app.exe

Work

Note
This work item does not include targeting Arm64: Arm64 hosts will produce x64 executables.
Targeting Arm64 will be added by #129807

  1. Update the Flutter Windows app template
    1. Replace hardcoded x64 with FLUTTER_TARGET_PLATFORM CMake variable. If FLUTTER_TARGET_PLATFORM is not set, its value should fallback to x64 for backwards compatibility.
    2. Update ephemeral directory path to use the target architecture's subfolder
  2. Update the Flutter tool:
    1. Update CMake generation to set the target architecture explicitly using -A x64
    2. Update CMake build to set the FLUTTER_TARGET_PLATFORM CMake variable to x64
    3. Add a target architecture subfolder to the ephemeral directory
    4. Automatically migrate CMake files to match the new app template
    5. Automatically clean the build/windows/ directory if it contains builds that used the old layout
  3. Update the Flutter docs:
    1. Update documentation that mentions the build output path
    2. Update the next release's breaking changes
@loic-sharma loic-sharma added platform-windows Building on or for Windows specifically a: desktop Running on desktop P3 Issues that are less important to the Flutter project labels Jun 29, 2023
@loic-sharma loic-sharma changed the title [Windows] Update the Windows build layout to include the architecture [Windows] Update the Windows build layout to include the target architecture Jun 30, 2023
@loic-sharma
Copy link
Member Author
loic-sharma commented 8000 Jun 30, 2023

/cc @pbo-linaro as you are working on this

@loic-sharma loic-sharma added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 30, 2023
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)
@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.

72E9

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 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 P3 Issues that are less important to the Flutter project platform-windows Building on or for Windows specifically 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

2 participants
0