Dawn: build libdawn-native as a static lib, not shared.
Also clean up the main BUILD.gn file to use deps instead of public_deps
where possible.
Change-Id: I2cc7719e42ae70be9181bdb02a1995cd2c780672
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249177
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index b5929c6..369ac06 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -564,10 +564,10 @@
if (skia_use_dawn) {
public_defines += [ "SK_DAWN" ]
sources += skia_dawn_sources
- public_deps += [
- "//third_party/dawn:dawn_headers",
+ public_deps += [ "//third_party/dawn:dawn_headers" ]
+ deps += [
"//third_party/dawn:dawncpp",
- "//third_party/dawn:libdawn_native_sources",
+ "//third_party/dawn:libdawn_native",
"//third_party/dawn:libdawn_proc",
]
if (dawn_enable_d3d12) {
diff --git a/third_party/dawn/BUILD.gn b/third_party/dawn/BUILD.gn
index da4addc..4953b25 100644
--- a/third_party/dawn/BUILD.gn
+++ b/third_party/dawn/BUILD.gn
@@ -260,9 +260,7 @@
"$dawn_root")
}
-# The meat of the compilation for libdawn_native so that we can cheaply have
-# shared_library / static_library / component versions of it.
-source_set("libdawn_native_sources") {
+static_library("libdawn_native") {
deps = [
":dawn_common",
":libdawn_native_utils_gen",
@@ -644,24 +642,3 @@
}
}
}
-
-# The shared library for libdawn_native for use by samples, tests, etc.
-shared_library("libdawn_native") {
- deps = [
- ":libdawn_native_sources",
- ]
-
- #Make headers publically visible
- public_deps = [
- ":libdawn_native_headers",
- ]
- public_configs = [ ":libdawn_public" ]
-
- # Tell dependents where to find this shared library
- if (is_mac) {
- ldflags = [
- "-install_name",
- "@rpath/${target_name}.dylib",
- ]
- }
-}