OLD | NEW |
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 17 matching lines...) Expand all Loading... |
28 # Definitions for building standalone V8 binaries to run on Android. | 28 # Definitions for building standalone V8 binaries to run on Android. |
29 # This is mostly excerpted from: | 29 # This is mostly excerpted from: |
30 # http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi | 30 # http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi |
31 | 31 |
32 { | 32 { |
33 'variables': { | 33 'variables': { |
34 # Location of Android NDK. | 34 # Location of Android NDK. |
35 'variables': { | 35 'variables': { |
36 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', | 36 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', |
37 'android_toolchain%': '<!(/bin/echo -n $ANDROID_TOOLCHAIN)', | 37 'android_toolchain%': '<!(/bin/echo -n $ANDROID_TOOLCHAIN)', |
38 # Switch between different build types, currently only '0' is | 38 # This is set when building the Android WebView inside the Android build |
39 # supported. | 39 # system, using the 'android' gyp backend. |
40 'android_build_type%': 0, | 40 'android_webview_build%': 0, |
41 }, | 41 }, |
42 'conditions': [ | 42 'conditions': [ |
43 ['android_ndk_root==""', { | 43 ['android_ndk_root==""', { |
44 'variables': { | 44 'variables': { |
45 'android_sysroot': '<(android_toolchain)/sysroot/', | 45 'android_sysroot': '<(android_toolchain)/sysroot/', |
46 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/', | 46 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/', |
47 }, | 47 }, |
48 'android_include': '<(android_sysroot)/usr/include', | 48 'android_include': '<(android_sysroot)/usr/include', |
49 'android_lib': '<(android_sysroot)/usr/lib', | 49 'android_lib': '<(android_sysroot)/usr/lib', |
50 'android_stlport_include': '<(android_stlport)/stlport', | 50 'android_stlport_include': '<(android_stlport)/stlport', |
51 'android_stlport_libs': '<(android_stlport)/libs', | 51 'android_stlport_libs': '<(android_stlport)/libs', |
52 }, { | 52 }, { |
53 'variables': { | 53 'variables': { |
54 'android_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(and
roid_target_arch)', | 54 'android_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(and
roid_target_arch)', |
55 'android_stlport': '<(android_ndk_root)/sources/cxx-stl/stlport/', | 55 'android_stlport': '<(android_ndk_root)/sources/cxx-stl/stlport/', |
56 }, | 56 }, |
57 'android_include': '<(android_sysroot)/usr/include', | 57 'android_include': '<(android_sysroot)/usr/include', |
58 'android_lib': '<(android_sysroot)/usr/lib', | 58 'android_lib': '<(android_sysroot)/usr/lib', |
59 'android_stlport_include': '<(android_stlport)/stlport', | 59 'android_stlport_include': '<(android_stlport)/stlport', |
60 'android_stlport_libs': '<(android_stlport)/libs', | 60 'android_stlport_libs': '<(android_stlport)/libs', |
61 }], | 61 }], |
62 ], | 62 ], |
63 # Enable to use the system stlport, otherwise statically | 63 # Enable to use the system stlport, otherwise statically |
64 # link the NDK one? | 64 # link the NDK one? |
65 'use_system_stlport%': '<(android_build_type)', | 65 'use_system_stlport%': '<(android_webview_build)', |
66 'android_stlport_library': 'stlport_static', | 66 'android_stlport_library': 'stlport_static', |
67 # Copy it out one scope. | 67 # Copy it out one scope. |
68 'android_build_type%': '<(android_build_type)', | 68 'android_webview_build%': '<(android_webview_build)', |
69 'OS': 'android', | 69 'OS': 'android', |
70 }, # variables | 70 }, # variables |
71 'target_defaults': { | 71 'target_defaults': { |
72 'defines': [ | 72 'defines': [ |
73 'ANDROID', | 73 'ANDROID', |
74 'V8_ANDROID_LOG_STDOUT', | 74 'V8_ANDROID_LOG_STDOUT', |
75 ], | 75 ], |
76 'configurations': { | 76 'configurations': { |
77 'Release': { | 77 'Release': { |
78 'cflags!': [ | 78 'cflags!': [ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 'libraries': [ | 134 'libraries': [ |
135 '-l<(android_stlport_library)', | 135 '-l<(android_stlport_library)', |
136 # Manually link the libgcc.a that the cross compiler uses. | 136 # Manually link the libgcc.a that the cross compiler uses. |
137 '<!($CC -print-libgcc-file-name)', | 137 '<!($CC -print-libgcc-file-name)', |
138 '-lc', | 138 '-lc', |
139 '-ldl', | 139 '-ldl', |
140 '-lstdc++', | 140 '-lstdc++', |
141 '-lm', | 141 '-lm', |
142 ], | 142 ], |
143 'conditions': [ | 143 'conditions': [ |
144 ['android_build_type==0', { | 144 ['android_webview_build==0', { |
145 'ldflags': [ | 145 'ldflags': [ |
146 '-Wl,-rpath-link=<(android_lib)', | 146 '-Wl,-rpath-link=<(android_lib)', |
147 '-L<(android_lib)', | 147 '-L<(android_lib)', |
148 ], | 148 ], |
149 }], | 149 }], |
150 ['target_arch == "arm"', { | 150 ['target_arch == "arm"', { |
151 'ldflags': [ | 151 'ldflags': [ |
152 # Enable identical code folding to reduce size. | 152 # Enable identical code folding to reduce size. |
153 '-Wl,--icf=safe', | 153 '-Wl,--icf=safe', |
154 ], | 154 ], |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 'ldflags!': [ | 250 'ldflags!': [ |
251 '-Wl,-z,noexecstack', | 251 '-Wl,-z,noexecstack', |
252 '-Wl,--gc-sections', | 252 '-Wl,--gc-sections', |
253 '-Wl,-O1', | 253 '-Wl,-O1', |
254 '-Wl,--as-needed', | 254 '-Wl,--as-needed', |
255 ], | 255 ], |
256 }], | 256 }], |
257 ], # target_conditions | 257 ], # target_conditions |
258 }, # target_defaults | 258 }, # target_defaults |
259 } | 259 } |
OLD | NEW |