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

Unified Diff: ports/sqlite/build.sh

Issue 1417223003: Switch from using 'nacl_main' to 'main' entry point (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 2 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 | « ports/samba/build.sh ('k') | ports/sqlite/nacl.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/sqlite/build.sh
diff --git a/ports/sqlite/build.sh b/ports/sqlite/build.sh
index 2a2f4165400e04d9d707a2dc714a74b7784bc342..b52bfff8ffc05a4e74910fb069fa513a4c6b613c 100644
--- a/ports/sqlite/build.sh
+++ b/ports/sqlite/build.sh
@@ -7,45 +7,23 @@ NACLPORTS_CPPFLAGS+=" -DNACL_SDK_VERSION=$NACL_SDK_VERSION"
if [ "${NACL_DEBUG}" = "1" ] ; then
NACLPORTS_CPPFLAGS+=" -DSQLITE_DEBUG -DSQLITE_LOCK_TRACE"
fi
-LIBS="-lnacl_io -pthread"
if [ "${NACL_SHARED}" = "1" ]; then
EXECUTABLE_DIR=.libs
- LIBS+=" -ldl"
+ NACLPORTS_LIBS+=" -ldl"
else
EXTRA_CONFIGURE_ARGS=--disable-dynamic-extensions
EXECUTABLE_DIR=.
fi
-export LIBS
+EnableCliMain
EXECUTABLES="sqlite3${NACL_EXEEXT}"
-BuildStep() {
- # Remove shell.o between building ppapi and sel_ldr versions of sqlite.
- # This is the only object that depends on the PPAPI define and therefore
- # needs to be rebuilt.
- Remove shell.o
- DefaultBuildStep
- if [ "${NACL_ARCH}" = "pnacl" ]; then
- local pexe=${EXECUTABLE_DIR}/sqlite3${NACL_EXEEXT}
- TranslateAndWriteLauncherScript ${pexe} x86-64 sqlite3.x86-64.nexe sqlite3
- fi
-
- # Build (at least shell.c) again but this time with nacl_io and -DPPAPI
- NEW_LIBS="${NACL_CLI_MAIN_LIB}"
- Banner "Building sqlite3_ppapi"
- sed -i.bak "s/sqlite3\$(EXEEXT)/sqlite3_ppapi\$(EXEEXT)/" Makefile
- sed -i.bak "s/CFLAGS = /CFLAGS = -DPPAPI /" Makefile
- sed -i.bak "s/-lnacl_io/${NEW_LIBS}/" Makefile
- Remove shell.o
- DefaultBuildStep
-}
-
PublishStep() {
MakeDir ${PUBLISH_DIR}
- local exe=${PUBLISH_DIR}/sqlite3_ppapi_${NACL_ARCH}${NACL_EXEEXT}
+ local exe=${PUBLISH_DIR}/sqlite3_${NACL_ARCH}${NACL_EXEEXT}
- LogExecute mv ${EXECUTABLE_DIR}/sqlite3_ppapi${NACL_EXEEXT} ${exe}
+ LogExecute cp ${EXECUTABLE_DIR}/sqlite3${NACL_EXEEXT} ${exe}
if [ "${NACL_ARCH}" = "pnacl" ]; then
LogExecute ${PNACLFINALIZE} ${exe}
fi
@@ -53,7 +31,7 @@ PublishStep() {
pushd ${PUBLISH_DIR}
LogExecute python ${NACL_SDK_ROOT}/tools/create_nmf.py \
-L${DESTDIR_LIB} \
- sqlite3_ppapi*${NACL_EXEEXT} \
+ sqlite3*${NACL_EXEEXT} \
-s . \
-o sqlite.nmf
LogExecute python ${TOOLS_DIR}/create_term.py sqlite.nmf
@@ -79,7 +57,7 @@ TestStep() {
LogExecute ${NACLCXX} ${INCLUDES} ${NACLPORTS_CPPFLAGS} \
${NACLPORTS_CFLAGS} ${NACLPORTS_LDFLAGS} \
-DPPAPI -o naclport_test/test${EXT} \
- ${START_DIR}/test.cc sqlite3.o ${LIBS} -lgtest
+ ${START_DIR}/test.cc sqlite3.o ${NACLPORTS_LIBS} -lgtest
[[ ${NACL_ARCH} == "pnacl" ]] && ${PNACLFINALIZE} \
-o naclport_test/test${NACL_EXEEXT} naclport_test/test${EXT}
« no previous file with comments | « ports/samba/build.sh ('k') | ports/sqlite/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698