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

Unified Diff: build_tools/common.sh

Issue 1556933002: Remove redundant pnacl translations (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 12 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 | « no previous file | ports/curl/build.sh » ('j') | ports/fftw-float/build.sh » ('J')
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 36151b7f5553159d2ca90e2eac7c0fd44a037862..0cc7d0c265eb78e54fb7740597469f41e65f94b8 100644
--- a/build_tools/common.sh
+++ b/build_tools/common.sh
@@ -1200,7 +1200,6 @@ DefaultPostBuildStep() {
TranslatePexe "${pexe}"
done
fi
- return
fi
for nexe in ${EXECUTABLES}; do
@@ -1208,11 +1207,18 @@ DefaultPostBuildStep() {
# Create a script which will run the executable in sel_ldr. The name
# of the script is the same as the name of the executable, either without
# any extension or with the .sh extension.
+
+ local script_name="${nexe}.sh"
if [[ ${nexe} == *${NACL_EXEEXT} && ! -d ${nexe%%${NACL_EXEEXT}} ]]; then
- WriteLauncherScript "${nexe%%${NACL_EXEEXT}}" "$(basename ${nexe})"
- else
- WriteLauncherScript "${nexe}.sh" "$(basename ${nexe})"
+ script_name="${nexe%%${NACL_EXEEXT}}"
+ fi
+
+ nexe="$(basename ${nexe})"
+ if [[ ${NACL_ARCH} == pnacl ]]; then
+ local basename="${nexe%.*}"
+ nexe=${basename}.x86-64.nexe
binji 2016/01/04 19:37:03 we assume x86_64 host?
fi
+ WriteLauncherScript "${script_name}" "${nexe}"
done
VerifySharedLibraryOrder
@@ -1349,29 +1355,7 @@ TranslateAndWriteLauncherScript() {
if [ "${PEXE_FINAL}" -nt "${NEXE}" ]; then
"${TRANSLATOR}" "${PEXE_FINAL}" -arch "${ARCH}" -o "${NEXE}"
fi
- WriteLauncherScriptPNaCl "${SCRIPT}" $(basename "${NEXE}") "${ARCH}"
-}
-
-
-#
-# Write a wrapper script that will run a nexe under sel_ldr, for PNaCl
-# $1 - Script name
-# $2 - Nexe name
-# $3 - sel_ldr architecture
-#
-WriteLauncherScriptPNaCl() {
- local script_name=$1
- local nexe_name=$2
- local arch=$3
- cat > "${script_name}" <<HERE
-#!/bin/bash
-SCRIPT_DIR=\$(dirname "\${BASH_SOURCE[0]}")
-NACL_SDK_ROOT="${NACL_SDK_ROOT}"
-
-"\${NACL_SDK_ROOT}/tools/sel_ldr.py" -p -- "\${SCRIPT_DIR}/${nexe_name}" "\$@"
-HERE
- chmod 750 "${script_name}"
- echo "Wrote script ${PWD}/${script_name}"
+ WriteLauncherScript "${SCRIPT}" $(basename "${NEXE}")
}
« no previous file with comments | « no previous file | ports/curl/build.sh » ('j') | ports/fftw-float/build.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698