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

Unified Diff: build/config/linux/BUILD.gn

Issue 674703002: Linux: Dynamically load libudev. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoped_udev
Patch Set: rebase to head, which includes third_party/libudev already Created 6 years, 1 month 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 | « no previous file | build/linux/system.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/linux/BUILD.gn
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn
index 758f42a6164a935143689fb215835fe9a2e8ad27..dec101779fce27f5abab7d4acd828135cebe3781 100644
--- a/build/config/linux/BUILD.gn
+++ b/build/config/linux/BUILD.gn
@@ -8,6 +8,12 @@ import("//build/config/sysroot.gni")
import("//build/config/ui.gni")
import("//tools/generate_library_loader/generate_library_loader.gni")
+gypi_values = exec_script(
+ "//build/gypi_to_gn.py",
+ [ rebase_path("../../linux/system.gyp") ],
+ "scope",
+ [ "../../linux/system.gyp" ])
+
config("sdk") {
if (sysroot != "") {
cflags = [ "--sysroot=" + sysroot ]
@@ -47,10 +53,6 @@ pkg_config("pangoft2") {
packages = [ "pangoft2" ]
}
-pkg_config("udev") {
- packages = [ "libudev" ]
-}
-
# Note: if your target also depends on //dbus, you don't need to add this
# config (it will get added automatically if you depend on //dbus).
pkg_config("dbus") {
@@ -140,19 +142,7 @@ if (use_brlapi) {
header = "<brlapi.h>"
config = ":brlapi_config"
- functions = [
- "brlapi_getHandleSize",
- "brlapi_error_location",
- "brlapi_strerror",
- "brlapi__acceptKeys",
- "brlapi__openConnection",
- "brlapi__closeConnection",
- "brlapi__getDisplaySize",
- "brlapi__enterTtyModeWithPath",
- "brlapi__leaveTtyMode",
- "brlapi__writeDots",
- "brlapi__readKey",
- ]
+ functions = gypi_values.libbrlapi_functions
}
}
@@ -166,7 +156,7 @@ pkg_config("gio_config") {
# (saucy) and earlier. Update the code to use
# g_settings_schema_source_list_schemas instead.
defines = [ "USE_GIO", "GLIB_DISABLE_DEPRECATION_WARNINGS" ]
-
+
# TODO(brettw) Theoretically I think ignore_libs should be set so that we
# don't link directly to GIO and use the loader generated below. But the gio
# target in GYP doesn't make any sense to me and appears to link directly to
@@ -183,15 +173,7 @@ generate_library_loader("gio") {
header = "<gio/gio.h>"
config = ":gio_config"
- functions = [
- "g_settings_new",
- "g_settings_get_child",
- "g_settings_get_string",
- "g_settings_get_boolean",
- "g_settings_get_int",
- "g_settings_get_strv",
- "g_settings_list_schemas",
- ]
+ functions = gypi_values.libgio_functions
}
# This generates a target named "libpci".
@@ -201,14 +183,34 @@ generate_library_loader("libpci") {
output_cc = "libpci_loader.cc"
header = "<pci/pci.h>"
- functions = [
- "pci_alloc",
- "pci_init",
- "pci_cleanup",
- "pci_scan_bus",
- "pci_fill_info",
- "pci_lookup_name",
- ]
+ functions = gypi_values.libpci_functions
}
# Looking for libspeechd? Use //third_party/speech-dispatcher
+
+# This generates a target named "udev0_loader".
+generate_library_loader("udev0_loader") {
+ name = "LibUdev0Loader"
+ output_h = "libudev0.h"
+ output_cc = "libudev0_loader.cc"
+ header = "\"third_party/libudev/libudev0.h\""
+
+ functions = gypi_values.libudev_functions
+}
+
+# This generates a target named "udev1_loader".
+generate_library_loader("udev1_loader") {
+ name = "LibUdev1Loader"
+ output_h = "libudev1.h"
+ output_cc = "libudev1_loader.cc"
+ header = "\"third_party/libudev/libudev1.h\""
+
+ functions = gypi_values.libudev_functions
+}
+
+group("udev") {
+ deps = [
+ ":udev0_loader",
+ ":udev1_loader",
+ ]
+}
« no previous file with comments | « no previous file | build/linux/system.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698