Even more DLL build fixes
These changes let us build a non-official component build on Windows,
using either MSVC or clang
Change-Id: Ia3279aa19e007e70ff28925ff70a0bfe8144d96f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207307
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index a66d1f0..6183189 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -296,6 +296,10 @@
# Probably only triggers when /EHsc is enabled.
"/wd4291", # no matching operator delete found;
# memory will not be freed if initialization throws an exception
+
+ # These only show up in shared builds:
+ "/wd4251", # class 'type' needs to have dll-interface to be used by clients of class 'type2'
+ "/wd4275", # non dll-interface class 'base' used as base for dll-interface class 'derived'
]
} else {
cflags += [
diff --git a/modules/particles/BUILD.gn b/modules/particles/BUILD.gn
index 6a7c4b5..3a3cfa1 100644
--- a/modules/particles/BUILD.gn
+++ b/modules/particles/BUILD.gn
@@ -4,7 +4,7 @@
# found in the LICENSE file.
declare_args() {
- skia_enable_particles = true
+ skia_enable_particles = !(is_win && is_component_build)
}
import("../../gn/skia.gni")
diff --git a/modules/skottie/BUILD.gn b/modules/skottie/BUILD.gn
index 5ab762b..8d921e8 100644
--- a/modules/skottie/BUILD.gn
+++ b/modules/skottie/BUILD.gn
@@ -6,7 +6,7 @@
import("../../gn/skia.gni")
declare_args() {
- skia_enable_skottie = true
+ skia_enable_skottie = !(is_win && is_component_build)
}
if (skia_enable_skottie) {
diff --git a/modules/skshaper/BUILD.gn b/modules/skshaper/BUILD.gn
index 9e97ce6..a672d98 100644
--- a/modules/skshaper/BUILD.gn
+++ b/modules/skshaper/BUILD.gn
@@ -6,7 +6,7 @@
import("../../gn/skia.gni")
declare_args() {
- skia_enable_skshaper = true
+ skia_enable_skshaper = !(is_win && is_component_build)
}
if (skia_enable_skshaper) {