This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Add support of cross-building the engine for ARM64 Linux Host #20254
Merged
cbracken
merged 12 commits into
flutter:master
from
HidenoriMatsubayashi:topic-support-linux-aarch64-cross-build
Sep 17, 2020
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4425890
add download linux aarch64 sysroot
9158ef8
support cross-build for linux aarch64
e63fb84
Merge remote-tracking branch 'origin/master' into topic-support-linux…
6013589
Merge remote-tracking branch 'origin/master' into topic-support-linux…
2a38fc5
Merge branch 'master' into topic-support-linux-aarch64-cross-build
eac3989
Merge branch 'master' into topic-support-linux-aarch64-cross-build
a0559c1
Merge branch 'master' into topic-support-linux-aarch64-cross-build
5a77367
Fix comment and condition
401b845
Merge branch 'master' into topic-support-linux-aarch64-cross-build
566316a
Merge branch 'master' into topic-support-linux-aarch64-cross-build
6d01cec
Fix GN formatting error
ed7f6ed
Merge branch 'master' into topic-support-linux-aarch64-cross-build
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ Simon Lightfoot <[email protected]> | |
Dwayne Slater <[email protected]> | ||
Tetsuhiro Ueda <[email protected]> | ||
shoryukenn <[email protected]> | ||
SOTEC GmbH & Co. KG <[email protected]> | ||
SOTEC GmbH & Co. KG <[email protected]> | ||
Hidenori Matsubayashi <[email protected]> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition no longer matches the comment. Aren't these host tools? It's not clear to me why you are cross-compiling them.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I have to modify the comment.
But I couldn't understand whyif (current_toolchain == host_toolchain)
was necessary. In order to run the Flutter SDK and Flutter Apps on ARM64 Linux platforms, we need to builddart-sdk
,frontend_server.dart.snapshot
andconst_finder.dart.snapshot
and so on. This condition is not necessary for cross build.I think I got it for now. But I think you need to build the following in order to run Flutter SDK on ARM64 Linux. Correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the answer to that offhand.
Are they uploaded as artifacts and then downloaded and run by the
flutter
tool? If so, then you are correct that they aren't host tools, in which case we should instead be deciding when to build them based on support Flutter SDK environments.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuartmorgan
(cc: @christopherfujino please support me.)
Thank you for your reply.
That's right.
I think that it is not necessary in the case where only cross build like Android and iOS, however it is necessary when running as Flutter SDK on Host.
I think that all can be built for ARM64 without problems.
//third_party/dart:create_sdk
This is dart-sdk and download to
${INSTALL_PATH}/flutter/bin/cache/dart-sdk
. ARM64 is already supported (link)//flutter/flutter_frontend_server:frontend_server
This is the Dart project, it can be built for ARM64.
It's downloaded to
${INSTALL_PATH}/flutter/bin/cache/artifacts/engine/linux-${arch}/frontend_server.dart.snapshot
//flutter/web_sdk
I'm not sure about this.
//flutter/shell/testing
This is the C++ source code for
flutter_test
?It's downloaded to
${INSTALL_PATH}/flutter/bin/cache/artifacts/engine/linux-${arch}/flutter_tester
//flutter/tools/const_finder
This is the Dart project.
It's downloaded to
${INSTALL_PATH}/flutter/bin/cache/artifacts/engine/linux-${arch}/const_finder.dart.snapshot
//flutter/tools/font-subset
This is the C++ source code.
It's downloaded to
${INSTALL_PATH}/flutter/bin/cache/artifacts/engine/linux-${arch}/font-subset
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense; I thought "host" in the comment meant build host, rather that "Flutter host". I think you'll want
(is_linux && !is_chromeos)
though.The comment should probably be something like:
(I wouldn't mention Linux since macOS and/or Windows could be done this way in the future.)
Also, you should extract this to a variable like
build_engine_artifacts
since it's used in two places.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much. I fixed it. Could you review my change?