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

Build the GLFW shell on Linux host builds but not target builds #9320

Merged
merged 1 commit into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shell/platform/glfw/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ declare_args() {
# but it can be enabled for supported platforms (Windows, macOS, and Linux)
# as an extra build artifact with this flag. The native toolkit shell will
# still be built as well.
build_glfw_shell = is_linux || is_win
build_glfw_shell = (is_linux || is_win) && current_toolchain == host_toolchain
}
30 changes: 18 additions & 12 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

assert(is_linux)

import("$flutter_root/shell/platform/glfw/config.gni")

group("linux") {
deps = [
":flutter_linux",
"$flutter_root/shell/platform/common/cpp/client_wrapper:publish_wrapper",
"$flutter_root/shell/platform/glfw:publish_headers_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
if (build_glfw_shell) {
deps = [
":flutter_linux",
"$flutter_root/shell/platform/common/cpp/client_wrapper:publish_wrapper",
"$flutter_root/shell/platform/glfw:publish_headers_glfw",
"$flutter_root/shell/platform/glfw/client_wrapper:publish_wrapper_glfw",
]
}
}

# Temporary workraround for the issue describe in
Expand All @@ -23,12 +27,14 @@ config("disable_fatal_link_warnings") {
ldflags = [ "-Wl,--no-fatal-warnings" ]
}

shared_library("flutter_linux") {
deps = [
"$flutter_root/shell/platform/glfw:flutter_glfw",
]
if (build_glfw_shell) {
shared_library("flutter_linux") {
deps = [
"$flutter_root/shell/platform/glfw:flutter_glfw",
]

configs += [ ":disable_fatal_link_warnings" ]
configs += [ ":disable_fatal_link_warnings" ]

public_configs = [ "$flutter_root:config" ]
public_configs = [ "$flutter_root:config" ]
}
}