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

Conversation

@pylaligand
Copy link
Contributor

This allows the shell to be built normally for a Fuchsia host.

import("//flutter/lib/ui/dart_ui.gni")

target_is_fuchsia = target_os == "fuchsia"
target_is_fuchsia = target_os == "fuchsia" && current_os == target_os
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should probably just be current_os == "fuchsia"

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. If we were building on Fuchsia and targeting, say, Windows, then we'd want to use the Fuchsia stuff for the host OS.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

This allows the shell to be built normally for a Fuchsia host.
@abarth
Copy link
Contributor

abarth commented Jun 21, 2017

So, this patch seems fine, but I'm not sure why this helps you. This will let you build a shell on the host system that is capable of running Flutter apps that are built for non-Fuchsia platforms. If your goal is to test Flutter apps that are built for Fuchsia, then this host binary will be missing the Fuchsia-specific built-in libraries.

@pylaligand
Copy link
Contributor Author

The present change only affects the generated Flutter content handler, not the apps. In order to build and analyze Flutter apps built for Fuchsia, I already needed to put workarounds in place such as https://github.com/flutter/flutter/blob/master/packages/flutter/BUILD.gn#L22.

The reason why I needed this change is that the generate_package_map rule ended up pulling the Flutter Dart package for the host, and that version did not properly link to sky_engine and made analysis fail. Another way to fix this would be to add || is_fuchsia_host to the workaround above, but I don't like the pattern, plus it means we'd still be building more stuff than we should need.

@abarth
Copy link
Contributor

abarth commented Jun 21, 2017

Ok. LGTM

@pylaligand pylaligand merged commit d13622c into flutter:master Jun 21, 2017
@pylaligand pylaligand deleted the hostvstarget branch June 21, 2017 22:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants