diff options
author | Jiyong Park <jiyong@google.com> | 2017-08-10 13:48:35 +0900 |
---|---|---|
committer | Jae Shin <jaeshin@google.com> | 2017-09-07 15:46:20 +0900 |
commit | 19232dff2cea470fb4c2ca0fa75c05aff8f202c5 (patch) | |
tree | 50008b8a79201642a5ea646cd4d93ed352c0caa3 /dist | |
parent | 9247c1167eb1055961c1202199acbe57479922fb (diff) |
ICU is disabled by Android.bp
By using vendor.cflags, SQLITE_ENABLE_ICU is on/off from Android.bp. No
need to def/undef it inside the source code.
Bug: 64514237
Test: BOARD_VNDK_VERSION=current m -j libsqlite libsqlite.vendor
Merged-In: If9771fa020e528445275281017e424a5bbc2ae99
Change-Id: If9771fa020e528445275281017e424a5bbc2ae99
(cherry picked from commit 633397eeef296584d3242d8a72790dcf11bb36fd)
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Android.bp | 3 | ||||
-rw-r--r-- | dist/Android.patch | 34 | ||||
-rw-r--r-- | dist/sqlite3.c | 9 |
3 files changed, 11 insertions, 35 deletions
diff --git a/dist/Android.bp b/dist/Android.bp index 7639450..39b3319 100644 --- a/dist/Android.bp +++ b/dist/Android.bp @@ -53,7 +53,6 @@ cc_defaults { target: { android: { cflags: [ - "-DSQLITE_ENABLE_ICU", "-DUSE_PREAD64", "-Dfdatasync=fdatasync", "-DHAVE_MALLOC_H=1", @@ -82,6 +81,7 @@ cc_library { "libicuuc", "libicui18n", ], + cflags: ["-DSQLITE_ENABLE_ICU"], // include android specific methods whole_static_libs: ["libsqlite3_android"], @@ -105,6 +105,7 @@ cc_library { enabled: true, }, vendor: { + cflags: ["-USQLITE_ENABLE_ICU"], exclude_shared_libs: ["libicuuc", "libicui18n"], }, }, diff --git a/dist/Android.patch b/dist/Android.patch index 27c5147..45aa6a9 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-06-09 18:50:55.552361036 +0900 -+++ ./shell.c 2017-06-09 18:50:55.636359925 +0900 +--- orig/shell.c 2017-07-24 11:46:21.256572726 +0900 ++++ ./shell.c 2017-07-24 11:46:21.336572354 +0900 @@ -52,6 +52,12 @@ #endif #include <ctype.h> @@ -38,25 +38,9 @@ diff -r -u -d orig/shell.c ./shell.c } diff -r -u -d orig/sqlite3.c ./sqlite3.c ---- orig/sqlite3.c 2017-06-26 14:41:48.608892557 +0900 -+++ ./sqlite3.c 2017-08-10 10:30:27.105711381 +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 -@@ -33542,7 +33551,7 @@ +--- orig/sqlite3.c 2017-07-24 11:46:21.332572372 +0900 ++++ ./sqlite3.c 2017-09-07 15:23:58.115384654 +0900 +@@ -33542,7 +33542,7 @@ SimulateIOError( rc=1 ); if( rc!=0 ){ storeLastErrno((unixFile*)id, errno); @@ -65,7 +49,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } *pSize = buf.st_size; -@@ -33578,7 +33587,7 @@ +@@ -33578,7 +33578,7 @@ struct stat buf; /* Used to hold return values of fstat() */ if( osFstat(pFile->h, &buf) ){ @@ -74,7 +58,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c } nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk; -@@ -34152,7 +34161,7 @@ +@@ -34152,7 +34152,7 @@ ** with the same permissions. */ if( osFstat(pDbFd->h, &sStat) ){ @@ -83,7 +67,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c goto shm_open_err; } -@@ -115928,7 +115937,7 @@ +@@ -115928,7 +115928,7 @@ } if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){ sqlite3SetString(pzErrMsg, db, "unsupported file format"); @@ -92,7 +76,7 @@ diff -r -u -d orig/sqlite3.c ./sqlite3.c goto initone_error_out; } -@@ -149763,13 +149772,25 @@ +@@ -149763,13 +149763,25 @@ ** module with sqlite. */ if( SQLITE_OK==rc diff --git a/dist/sqlite3.c b/dist/sqlite3.c index a1be12b..9db21a8 100644 --- a/dist/sqlite3.c +++ b/dist/sqlite3.c @@ -84,15 +84,6 @@ #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 |