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

Unified Diff: build_tools/common.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 | « PRESUBMIT.py ('k') | build_tools/pnacl-configure-shim.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/common.sh
diff --git a/build_tools/common.sh b/build_tools/common.sh
index 1b342eca51a16cc20bf5d8d21241ec273ed55b59..f8a05803cc42bce9c73b804438348770e95765f9 100644
--- a/build_tools/common.sh
+++ b/build_tools/common.sh
@@ -119,12 +119,11 @@ fi
# libcli_main.a has a circular dependency which makes static link fail
# (cli_main => nacl_io => ppapi_cpp => cli_main). To break this loop,
# you should use this instead of -lcli_main.
-export NACL_CLI_MAIN_LIB="-Xlinker -unacl_main -Xlinker -uPSUserMainGet \
--lcli_main -lnacl_spawn -ltar -lppapi_simple -lnacl_io \
--lppapi -l${NACL_CXX_LIB}"
-export NACL_CLI_MAIN_LIB_CPP="-Xlinker -unacl_main -Xlinker -uPSUserMainGet \
--lcli_main -lnacl_spawn -ltar -lppapi_simple_cpp -lnacl_io \
--lppapi_cpp -lppapi -l${NACL_CXX_LIB}"
+NACL_CLI_MAIN_LDFLAGS="-Xlinker -uPSUserMainGet"
+NACL_CLI_MAIN_LIB="-lcli_main -lnacl_spawn -ltar -lppapi_simple \
+-lnacl_io -lppapi -l${NACL_CXX_LIB}"
+NACL_CLI_MAIN_LIB_CPP="-lcli_main -lnacl_spawn -ltar -lppapi_simple_cpp \
+-lnacl_io -lppapi_cpp -lppapi -l${NACL_CXX_LIB}"
# Python variables
NACL_PYSETUP_ARGS=""
@@ -507,6 +506,16 @@ SetOptFlags() {
fi
}
+EnableCliMain() {
+ NACLPORTS_LDFLAGS+=" ${NACL_CLI_MAIN_LDFLAGS}"
+ NACLPORTS_LIBS+=" ${NACL_CLI_MAIN_LIB}"
+}
+
+EnableCliMainCxx() {
+ NACLPORTS_LDFLAGS+=" ${NACL_CLI_MAIN_LDFLAGS}"
+ NACLPORTS_LIBS+=" ${NACL_CLI_MAIN_LIB_CPP}"
+}
+
EnableGlibcCompat() {
if [ "${NACL_LIBC}" = "newlib" ]; then
NACLPORTS_CPPFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
@@ -772,6 +781,7 @@ SetupSDKBuildSystem() {
export MAKEFLAGS
BUILD_DIR=${START_DIR}
+ echo "LDFLAGS=${LDFLAGS}"
}
SetupCrossPaths() {
@@ -803,7 +813,7 @@ SetupCrossEnvironment() {
export CFLAGS=${NACLPORTS_CFLAGS}
export CPPFLAGS=${NACLPORTS_CPPFLAGS}
export CXXFLAGS=${NACLPORTS_CXXFLAGS}
- export LDFLAGS="${NACLPORTS_LDFLAGS} ${NACLPORTS_LIBS}"
+ export LDFLAGS=${NACLPORTS_LDFLAGS}
export ARFLAGS=${NACL_ARFLAGS}
export AR_FLAGS=${NACL_ARFLAGS}
export LIBS=${LIBS:-${NACLPORTS_LIBS}}
« no previous file with comments | « PRESUBMIT.py ('k') | build_tools/pnacl-configure-shim.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698