-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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
- Update the Flutter Windows app template
- Replace hardcoded x64 with
FLUTTER_TARGET_PLATFORMCMake variable. IfFLUTTER_TARGET_PLATFORMis not set, its value should fallback to x64 for backwards compatibility. - Update ephemeral directory path to use the target architecture's subfolder
- Replace hardcoded x64 with
- Update the Flutter tool:
- Update CMake generation to set the target architecture explicitly using
-A x64 - Update CMake build to set the
FLUTTER_TARGET_PLATFORMCMake variable tox64 - Add a target architecture subfolder to the
ephemeraldirectory - Automatically migrate CMake files to match the new app template
- Automatically clean the
build/windows/directory if it contains builds that used the old layout
- Update CMake generation to set the target architecture explicitly using
- Update the Flutter docs:
- Update documentation that mentions the build output path
- Update the next release's breaking changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamOwned by the Windows platform teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.