summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2017-08-09 20:15:42 +0900
committerJiyong Park <jiyong@google.com>2017-08-10 01:02:15 +0900
commitb4076dfd66f114263a1f70cf3ba73c2d55ccb3b0 (patch)
treeafe40ca8930c223781b57b469d49eefb60520f80 /dist
parenta0540df7996767c3404874ec8d99df67a763cbe6 (diff)
Don't use ICU when built for vendors
libicuuc.so isn't available for vendors, thus ICU is turned off when libsqlite is built for vendors. Bug: 64104535 Test: BOARD_VNDK_VERSION=current m -j libsqlite.vendor Change-Id: I682502ba5bdc5f76a0363a95d01b1081c1bc01a4
Diffstat (limited to 'dist')
-rw-r--r--dist/Android.bp6
-rw-r--r--dist/Android.patch34
-rw-r--r--dist/sqlite3.c9
3 files changed, 40 insertions, 9 deletions
diff --git a/dist/Android.bp b/dist/Android.bp
index 9f1c602..75d03ab 100644
--- a/dist/Android.bp
+++ b/dist/Android.bp
@@ -68,6 +68,9 @@ cc_library {
name: "libsqlite",
defaults: ["sqlite-defaults"],
vendor_available: true,
+ vndk: {
+ enabled: true,
+ },
srcs: ["sqlite3.c"],
@@ -102,6 +105,9 @@ cc_library {
windows: {
enabled: true,
},
+ vendor: {
+ exclude_shared_libs: ["libicuuc", "libicui18n"],
+ },
},
export_include_dirs: ["."],
diff --git a/dist/Android.patch b/dist/Android.patch
index bdc8f86..8132ee2 100644
--- a/dist/Android.patch
+++ b/dist/Android.patch
@@ -1,6 +1,6 @@
diff -r -u -d orig/shell.c ./shell.c
---- orig/shell.c 2017-08-01 10:40:56.000000000 -0700
-+++ ./shell.c 2017-08-02 11:00:50.083038316 -0700
+--- orig/shell.c 2017-07-21 09:46:53.488326209 +0900
++++ ./shell.c 2017-07-21 09:46:53.620324492 +0900
@@ -52,6 +52,12 @@
#endif
#include <ctype.h>
@@ -38,9 +38,25 @@ diff -r -u -d orig/shell.c ./shell.c
}
diff -r -u -d orig/sqlite3.c ./sqlite3.c
---- orig/sqlite3.c 2017-08-01 10:40:56.000000000 -0700
-+++ ./sqlite3.c 2017-08-02 11:00:50.135037255 -0700
-@@ -33618,7 +33618,7 @@
+--- orig/sqlite3.c 2017-08-04 10:42:31.294648222 +0900
++++ ./sqlite3.c 2017-08-10 00:35:18.935880997 +0900
+@@ -84,6 +84,15 @@
+ #endif
+
+ /*
++** When sqlite is built for the VNDK, ICU is disabled because
++** libicuuc.so and libicui18n.so aren't available then.
++** TODO(b/64514237): move this to Android.bp
++*/
++#ifdef __ANDROID_VNDK__
++#undef SQLITE_ENABLE_ICU
++#endif
++
++/*
+ ** Include the header file used to customize the compiler options for MSVC.
+ ** This should be done first so that it can successfully prevent spurious
+ ** compiler warnings due to subsequent content in this file and other files
+@@ -33618,7 +33627,7 @@
SimulateIOError( rc=1 );
if( rc!=0 ){
storeLastErrno((unixFile*)id, errno);
@@ -49,7 +65,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
}
*pSize = buf.st_size;
-@@ -33654,7 +33654,7 @@
+@@ -33654,7 +33663,7 @@
struct stat buf; /* Used to hold return values of fstat() */
if( osFstat(pFile->h, &buf) ){
@@ -58,7 +74,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
}
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
-@@ -34262,7 +34262,7 @@
+@@ -34262,7 +34271,7 @@
** with the same permissions.
*/
if( osFstat(pDbFd->h, &sStat) ){
@@ -67,7 +83,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto shm_open_err;
}
-@@ -116120,7 +116120,7 @@
+@@ -116120,7 +116129,7 @@
}
if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
sqlite3SetString(pzErrMsg, db, "unsupported file format");
@@ -76,7 +92,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c
goto initone_error_out;
}
-@@ -149914,13 +149914,25 @@
+@@ -149914,13 +149923,25 @@
** module with sqlite.
*/
if( SQLITE_OK==rc
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index 59bba65..3eaac07 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -84,6 +84,15 @@
#endif
/*
+** When sqlite is built for the VNDK, ICU is disabled because
+** libicuuc.so and libicui18n.so aren't available then.
+** TODO(b/64514237): move this to Android.bp
+*/
+#ifdef __ANDROID_VNDK__
+#undef SQLITE_ENABLE_ICU
+#endif
+
+/*
** Include the header file used to customize the compiler options for MSVC.
** This should be done first so that it can successfully prevent spurious
** compiler warnings due to subsequent content in this file and other files