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

Unified Diff: native_client_sdk/src/build_tools/make_pnacl_component.sh

Issue 2490823003: [NaCl SDK] Update the make_pnacl_component script to GN (Closed)
Patch Set: use x86 instead of ia32 Created 4 years, 1 month 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 | « native_client_sdk/src/build_tools/build_sdk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/make_pnacl_component.sh
diff --git a/native_client_sdk/src/build_tools/make_pnacl_component.sh b/native_client_sdk/src/build_tools/make_pnacl_component.sh
index 4674ac6e327153b659488b9efe6957362012aa72..2d9a5ad0fc051644cec13b851b50cdd983a7b1a6 100755
--- a/native_client_sdk/src/build_tools/make_pnacl_component.sh
+++ b/native_client_sdk/src/build_tools/make_pnacl_component.sh
@@ -4,7 +4,7 @@
# found in the LICENSE file.
# This script builds out/pnacl_multicrx_<rev>.zip for upload to the Chrome
-# Web Store. It runs gyp + ninja once for each architecture and assembles
+# Web Store. It runs GN + ninja once for each architecture and assembles
# the results along with a manifest file.
# TODO(sbc): rewrite this in python
@@ -16,41 +16,28 @@ SCRIPT_DIR="$(cd $(dirname $0) && pwd)"
CHROME_SRC=$(dirname $(dirname $(dirname ${SCRIPT_DIR})))
cd ${CHROME_SRC}
-run_gyp() {
- # The original version of the script ran 'gclient runhooks' which run turn
- # runs gyp_chromium. However its a lot faster and quieter to just run the
- # gyp file containing the target we need.
- gyp_dir=ppapi/native_client/src/untrusted/pnacl_support_extension
- build/gyp_chromium --depth=. $gyp_dir/pnacl_support_extension.gyp
+run_gn() {
+ local arch=$1
+ gn gen out_pnacl/$arch --args="target_cpu=\"$arch\" is_debug=false"
}
-individual_packages() {
- export GYP_GENERATOR_FLAGS="output_dir=out_pnacl"
+cpu_package() {
+ local arch=$1
+ local alt_arch=$2
local base_out_dir=out
- # arm
- rm -rf out_pnacl/
- GYP_DEFINES="target_arch=arm" run_gyp
- ninja -C out_pnacl/Release/ pnacl_support_extension
- local target_dir=${base_out_dir}/pnacl_arm
- mkdir -p ${target_dir}
- cp out_pnacl/Release/pnacl/* ${target_dir}/.
-
- # ia32
- rm -rf out_pnacl/
- GYP_DEFINES="target_arch=ia32" run_gyp
- ninja -C out_pnacl/Release/ pnacl_support_extension
- target_dir=${base_out_dir}/pnacl_x86_32
+ rm -rf out_pnacl/$arch
+ run_gn $arch
+ ninja -C out_pnacl/$arch pnacl_support_extension
+ local target_dir=${base_out_dir}/pnacl_${alt_arch}
mkdir -p ${target_dir}
- cp out_pnacl/Release/pnacl/* ${target_dir}/.
+ cp out_pnacl/$arch/pnacl/* ${target_dir}/.
+}
- # x64
- rm -rf out_pnacl/
- GYP_DEFINES="target_arch=x64" run_gyp
- ninja -C out_pnacl/Release/ pnacl_support_extension
- target_dir=${base_out_dir}/pnacl_x86_64
- mkdir -p ${target_dir}
- cp out_pnacl/Release/pnacl/* ${target_dir}/.
+individual_packages() {
+ cpu_package x64 x86_64
+ cpu_package arm arm
+ cpu_package x86 x86_32
}
multi_crx() {
« no previous file with comments | « native_client_sdk/src/build_tools/build_sdk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698