Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
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/common/cpp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ source_set("common_cpp") {
deps = [
":common_cpp_library_headers",
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
]

public_deps = [
Expand Down
4 changes: 2 additions & 2 deletions shell/platform/darwin/macos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ source_set("flutter_framework_source") {

deps = [
"//flutter/shell/platform/darwin/common:framework_shared",
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
]

public_configs = [ "//flutter:config" ]
Expand Down Expand Up @@ -115,7 +115,7 @@ executable("flutter_desktop_darwin_unittests") {
":flutter_desktop_darwin_fixtures",
":flutter_framework_source",
"//flutter/shell/platform/darwin/common:framework_shared",
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
"//flutter/testing",
"//flutter/testing:dart",
"//flutter/testing:skia",
Expand Down
16 changes: 12 additions & 4 deletions shell/platform/embedder/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ embedder_source_set("embedder") {
public_configs = []
}

embedder_source_set("embedder_with_symbol_prefix") {
public_configs = [ ":embedder_prefix_config" ]
embedder_source_set("embedder_as_internal_library") {
public_configs = [ ":embedder_internal_library_config" ]
}

source_set("embedder_headers") {
Expand All @@ -98,8 +98,16 @@ source_set("embedder_headers") {
public_configs = [ "//flutter:config" ]
}

config("embedder_prefix_config") {
defines = [ "FLUTTER_API_SYMBOL_PREFIX=Embedder" ]
# For using the embedder API as internal implementation detail of an
# embedding.
config("embedder_internal_library_config") {
defines = [
# Use prefixed symbols to avoid collisions with higher level API.
"FLUTTER_API_SYMBOL_PREFIX=Embedder",

# Don't export the embedder.h API surface.
"FLUTTER_NO_EXPORT",
]
}

test_fixtures("fixtures") {
Expand Down
2 changes: 2 additions & 0 deletions shell/platform/embedder/embedder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
#include "third_party/dart/runtime/bin/elf_loader.h"
#include "third_party/dart/runtime/include/dart_native_api.h"

#if !defined(FLUTTER_NO_EXPORT)
#if OS_WIN
#define FLUTTER_EXPORT __declspec(dllexport)
#else // OS_WIN
#define FLUTTER_EXPORT __attribute__((visibility("default")))
#endif // OS_WIN
#endif // !FLUTTER_NO_EXPORT

extern "C" {
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/glfw/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ source_set("flutter_glfw") {
"//flutter/shell/platform/common/cpp:common_cpp",
"//flutter/shell/platform/common/cpp:common_cpp_input",
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
"//flutter/shell/platform/glfw/client_wrapper:client_wrapper_glfw",
"//third_party/rapidjson",
]
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ source_set("flutter_linux") {
]

deps = [
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
]
}

Expand Down
2 changes: 1 addition & 1 deletion shell/platform/windows/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ source_set("flutter_windows_source") {
"//flutter/shell/platform/common/cpp:common_cpp",
"//flutter/shell/platform/common/cpp:common_cpp_input",
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
"//flutter/shell/platform/embedder:embedder_as_internal_library",
"//flutter/shell/platform/windows/client_wrapper:client_wrapper_windows",
"//third_party/angle:libEGL_static", # the order of libEGL_static and libGLESv2_static is important.. if reversed, will cause a linker error DllMain already defined in LIBCMTD.lib
"//third_party/angle:libGLESv2_static",
Expand Down