Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: Makefile

Issue 29509592: Issue 5267 - Add support of 64 bit android (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Left Patch Set: Created Aug. 8, 2017, 12:59 p.m.
Right Patch Set: address comments Created Aug. 8, 2017, 3:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | README.md » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 V8_DIR :=$(shell pwd -L)/third_party/v8/ 1 V8_DIR :=$(shell pwd -L)/third_party/v8/
2 HOST_ARCH :=$(shell python third_party/detect_v8_host_arch.py) 2 HOST_ARCH :=$(shell python third_party/detect_v8_host_arch.py)
3 3
4 GYP_PARAMETERS=host_arch=${HOST_ARCH} 4 GYP_PARAMETERS=host_arch=${HOST_ARCH}
5 5
6 ifndef HOST_OS 6 ifndef HOST_OS
7 raw_OS = $(shell uname -s) 7 raw_OS = $(shell uname -s)
8 ifeq (${raw_OS},Linux) 8 ifeq (${raw_OS},Linux)
9 HOST_OS=linux 9 HOST_OS=linux
10 else ifeq (${raw_OS},Darwin) 10 else ifeq (${raw_OS},Darwin)
11 HOST_OS=mac 11 HOST_OS=mac
12 endif 12 endif
13 endif 13 endif
14 14
15 ifneq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" "" 15 ifneq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" ""
16 BUILD_V8=do-nothing 16 BUILD_V8=do-nothing
17 ABP_GYP_PARAMETERS+= libv8_lib_dir=${LIBV8_LIB_DIR} libv8_include_dir=${LIBV8_IN CLUDE_DIR} 17 ABP_GYP_PARAMETERS+= libv8_lib_dir=${LIBV8_LIB_DIR} libv8_include_dir=${LIBV8_IN CLUDE_DIR}
18 else 18 else
19 BUILD_V8=build-v8 19 BUILD_V8=build-v8
20 endif 20 endif
21 21
22 ifneq ($(ANDROID_ARCH),) 22 ifneq ($(ANDROID_ARCH),)
23 ANDROID_PLATFORM_LEVEL=android-9
23 GYP_PARAMETERS+= OS=android target_arch=${ANDROID_ARCH} 24 GYP_PARAMETERS+= OS=android target_arch=${ANDROID_ARCH}
24 ifeq ($(ANDROID_ARCH),arm) 25 ifeq ($(ANDROID_ARCH),arm)
25 ANDROID_ABI = armeabi-v7a 26 ANDROID_ABI = armeabi-v7a
26 else ifeq ($(ANDROID_ARCH),ia32) 27 else ifeq ($(ANDROID_ARCH),ia32)
27 ANDROID_ABI = x86 28 ANDROID_ABI = x86
28 else ifeq ($(ANDROID_ARCH),arm64) 29 else ifeq ($(ANDROID_ARCH),arm64)
29 ANDROID_ABI = arm64-v8a 30 ANDROID_ABI = arm64-v8a
31 # minimal platform having arch-arm64, see ndk/platforms
32 ANDROID_PLATFORM_LEVEL=android-21
30 else 33 else
31 $(error "Unsupported Android architecture: $(ANDROID_ARCH)) 34 $(error "Unsupported Android architecture: $(ANDROID_ARCH))
32 endif 35 endif
33 ANDROID_DEST_DIR = android_$(ANDROID_ARCH).release 36 ANDROID_DEST_DIR = android_$(ANDROID_ARCH).release
34 37
35 ifeq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" "" 38 ifeq "$(and ${LIBV8_LIB_DIR}, ${LIBV8_INCLUDE_DIR})" ""
36 ABP_GYP_PARAMETERS+= libv8_lib_dir=${ANDROID_DEST_DIR} 39 ABP_GYP_PARAMETERS+= libv8_lib_dir=${ANDROID_DEST_DIR}
37 BUILD_V8=build-v8-android 40 BUILD_V8=build-v8-android
38 endif 41 endif
39 42
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 docs: 79 docs:
77 doxygen 80 doxygen
78 81
79 clean: 82 clean:
80 $(RM) -r build docs 83 $(RM) -r build docs
81 84
82 android_x86: 85 android_x86:
83 ANDROID_ARCH="ia32" $(MAKE) android_multi 86 ANDROID_ARCH="ia32" $(MAKE) android_multi
84 87
85 android_arm: 88 android_arm:
86 ANDROID_ARCH="arm" $(MAKE) android_multi 89 ANDROID_ARCH="arm" $(MAKE) android_multi
hub 2017/08/08 13:50:01 Shouldn't we add a android_arm64 target here?
sergei 2017/08/08 15:47:32 Right
87 90
91 android_arm64:
92 ANDROID_ARCH="arm64" $(MAKE) android_multi
93
88 ifneq ($(ANDROID_ARCH),) 94 ifneq ($(ANDROID_ARCH),)
89 v8_android_multi: ensure_dependencies 95 v8_android_multi: ensure_dependencies
90 cd third_party/v8 && GYP_GENERATORS=make-android \ 96 cd third_party/v8 && GYP_GENERATORS=make-android \
91 GYP_DEFINES="${GYP_PARAMETERS} v8_target_arch=${ANDROID_ARCH}" \ 97 GYP_DEFINES="${GYP_PARAMETERS} v8_target_arch=${ANDROID_ARCH}" \
92 PYTHONPATH="${V8_DIR}tools/generate_shim_headers:${V8_DIR}gypfiles:${P YTHONPATH}" \ 98 PYTHONPATH="${V8_DIR}tools/generate_shim_headers:${V8_DIR}gypfiles:${P YTHONPATH}" \
93 tools/gyp/gyp \ 99 tools/gyp/gyp \
94 --generator-output=../../build src/v8.gyp \ 100 --generator-output=../../build src/v8.gyp \
95 -Igypfiles/standalone.gypi \ 101 -Igypfiles/standalone.gypi \
96 --depth=. \ 102 --depth=. \
97 -S.android_${ANDROID_ARCH}.release \ 103 -S.android_${ANDROID_ARCH}.release \
(...skipping 13 matching lines...) Expand all
111 v8_android_multi_mac_arm: v8_android_multi 117 v8_android_multi_mac_arm: v8_android_multi
112 find build/android_arm.release/ -depth 1 -iname \*.a -exec ${ANDROID_NDK _ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux -androideabi-ranlib {} \; 118 find build/android_arm.release/ -depth 1 -iname \*.a -exec ${ANDROID_NDK _ROOT}/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux -androideabi-ranlib {} \;
113 119
114 v8_android_multi_mac_arm64: v8_android_multi 120 v8_android_multi_mac_arm64: v8_android_multi
115 find build/android_arm64.release/ -depth 1 -iname \*.a -exec ${ANDROID_N DK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64 -linux-android-ranlib {} \; 121 find build/android_arm64.release/ -depth 1 -iname \*.a -exec ${ANDROID_N DK_ROOT}/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/bin/aarch64 -linux-android-ranlib {} \;
116 122
117 build-v8-android: v8_android_multi_${HOST_OS}_${ANDROID_ARCH} 123 build-v8-android: v8_android_multi_${HOST_OS}_${ANDROID_ARCH}
118 124
119 android_multi: ${BUILD_V8} ensure_dependencies 125 android_multi: ${BUILD_V8} ensure_dependencies
120 GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" \ 126 GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" \
121 python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus. gypi --generator-output=build -Gandroid_ndk_version=r9 libadblockplus.gyp 127 python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus. gypi --generator-output=build -Gandroid_ndk_version=r9 libadblockplus.gyp
hub 2017/08/08 13:50:00 I'm not sure how relevant that is, but ndk version
sergei 2017/08/08 15:47:32 Good catch. It's for gyp and it seems the value i
sergei 2017/08/10 13:45:49 See https://codereview.adblockplus.org/29511621/
anton 2017/08/09 07:01:04 I can see it's closed but it looks strange : ndk 1
sergei 2017/08/10 13:45:49 Done in https://codereview.adblockplus.org/2951162
122 $(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \ 128 $(ANDROID_NDK_ROOT)/ndk-build -C build installed_modules \
123 BUILDTYPE=Release \ 129 BUILDTYPE=Release \
124 APP_ABI=$(ANDROID_ABI) \ 130 APP_ABI=$(ANDROID_ABI) \
125 » APP_PLATFORM=android-9 \ 131 » APP_PLATFORM=${ANDROID_PLATFORM_LEVEL} \
132 » APP_PIE=true \
126 APP_STL=c++_static \ 133 APP_STL=c++_static \
127 APP_BUILD_SCRIPT=Makefile \ 134 APP_BUILD_SCRIPT=Makefile \
128 NDK_PROJECT_PATH=. \ 135 NDK_PROJECT_PATH=. \
129 NDK_OUT=. \ 136 NDK_OUT=. \
130 NDK_APP_DST_DIR=$(ANDROID_DEST_DIR) 137 NDK_APP_DST_DIR=$(ANDROID_DEST_DIR)
131 endif 138 endif
132 139
LEFTRIGHT
« no previous file | README.md » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld