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

Unified Diff: third_party/sqlite/BUILD.gn

Issue 1306863006: [sqlite] Respect the gyp and gn component switch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Back to final CL to land. Created 5 years, 4 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 | « sql/sql.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/BUILD.gn
diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn
index 866c2449101283f3c98644074a7f009372f102b1..a9c6eb5f86102af8181b937073e7d84c3ad6bbfe 100644
--- a/third_party/sqlite/BUILD.gn
+++ b/third_party/sqlite/BUILD.gn
@@ -10,11 +10,15 @@ declare_args() {
}
if (!use_system_sqlite) {
+ # TODO(shess): This cannot possibly be the right thing to do. AFAICT it is
+ # only necessary so that WebDatabase can #include <sqlite3.h>.
config("sqlite_config") {
include_dirs = [ "." ]
brettw 2015/08/31 20:56:59 I think you can just add this to the sqlite_export
Scott Hess - ex-Googler 2015/08/31 21:06:49 I probably could, but I've become very conservativ
brettw 2015/08/31 21:11:05 Can you do that as a followup?
Scott Hess - ex-Googler 2015/08/31 21:15:58 Definitely, http://crbug.com/526828
}
- source_set("sqlite") {
+ component("sqlite_build") {
+ visibility = [ ":*" ]
+
sources = [
"amalgamation/sqlite3.c",
"amalgamation/sqlite3.h",
@@ -31,6 +35,13 @@ if (!use_system_sqlite) {
"SQLITE_SEPARATE_CACHE_POOLS",
"THREADSAFE",
]
+ if (is_component_build) {
+ if (is_win) {
+ defines += [ "SQLITE_API=__declspec(dllexport)" ]
+ } else {
+ defines += [ "SQLITE_API=__attribute__((visibility(\"default\")))" ]
+ }
+ }
if (is_chromeos) {
defines += [
# Despite obvious warnings about not using this flag in deployment, we
@@ -84,7 +95,10 @@ if (!use_system_sqlite) {
if (is_linux) {
libs = [ "dl" ]
} else if (is_mac || is_ios) {
- libs = [ "CoreFoundation.framework" ]
+ libs = [
+ "CoreFoundation.framework",
+ "CoreServices.framework",
+ ]
} else if (is_android) {
defines += [
"SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576",
@@ -98,8 +112,17 @@ if (!use_system_sqlite) {
deps = [
"//third_party/icu",
]
+ }
- public_configs = [ ":sqlite_config" ]
+ config("sqlite_export") {
+ if (is_component_build && is_win) {
+ defines = [ "SQLITE_API=__declspec(dllimport)" ]
+ }
+ }
+
+ group("sqlite") {
brettw 2015/08/31 20:56:59 It might be nice to add a comment about why this i
Scott Hess - ex-Googler 2015/08/31 21:06:49 Acknowledged.
+ public_deps = [ ":sqlite_build" ]
+ public_configs = [ ":sqlite_export", ":sqlite_config" ]
}
if (is_linux) {
« no previous file with comments | « sql/sql.gyp ('k') | third_party/sqlite/sqlite.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698