Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2338)

Unified Diff: mojo/public/c/system/BUILD.gn

Issue 599283003: Make gn check //mojo/public/* pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/c/gles2/BUILD.gn ('k') | mojo/public/c/system/tests/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/system/BUILD.gn
diff --git a/mojo/public/c/system/BUILD.gn b/mojo/public/c/system/BUILD.gn
index 38a348680331a032e14b2307dfcae185890dd753..028bc3ccb3ec3debbfb9fa4688376b5010294a54 100644
--- a/mojo/public/c/system/BUILD.gn
+++ b/mojo/public/c/system/BUILD.gn
@@ -2,10 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# Depend on this target to use the types etc defined in the system without
+# linking against a specific implementation of the system. To link against a
+# particular implementation, use the :for_component or
+# :for_shared_library targets, depending on the type of target you are.
source_set("system") {
sources = [
- "../../platform/native/system_thunks.cc",
- "../../platform/native/system_thunks.h",
"buffer.h",
"core.h",
"data_pipe.h",
@@ -15,16 +17,6 @@ source_set("system") {
"system_export.h",
"types.h",
]
- defines = [ "MOJO_SYSTEM_IMPLEMENTATION" ]
-
- # The GYP target analogous to this one builds this code into a
- # static library. When building for Android, both the GYP and GN
- # builds add --exclude-libs=ALL globally, which means that all
- # symbols in static libraries are excluded from export. That's a
- # problem, as code outside this target needs to be able to call
- # MojoSetSystemThunks(). Therefore, the GYP target needs to specifiy
- # that all dependent targets remove that link flag. Since GN uses a
- # source_set here, this flag change is not needed.
}
# In an is_component_build build, everything can link against //mojo/system
@@ -40,14 +32,16 @@ source_set("system") {
# //mojo/public/c/system:for_shared_library to your deps
group("for_shared_library") {
+ public_deps = [ ":system" ]
if (is_component_build) {
deps = [ "//mojo/system" ]
} else {
- deps = [ ":system" ]
+ deps = [ "//mojo/public/platform/native:system_thunks" ]
}
}
group("for_component") {
+ public_deps = [ ":system" ]
if (is_component_build) {
deps = [ "//mojo/system" ]
}
« no previous file with comments | « mojo/public/c/gles2/BUILD.gn ('k') | mojo/public/c/system/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698