| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 ['target_arch=="x64"', { | 62 ['target_arch=="x64"', { |
| 63 'android_lib': '<(android_sysroot)/usr/lib64', | 63 'android_lib': '<(android_sysroot)/usr/lib64', |
| 64 }, { | 64 }, { |
| 65 'android_lib': '<(android_sysroot)/usr/lib', | 65 'android_lib': '<(android_sysroot)/usr/lib', |
| 66 }], | 66 }], |
| 67 ], | 67 ], |
| 68 'android_stlport_include': '<(android_stlport)/stlport', | 68 'android_stlport_include': '<(android_stlport)/stlport', |
| 69 'android_stlport_libs': '<(android_stlport)/libs', | 69 'android_stlport_libs': '<(android_stlport)/libs', |
| 70 }], | 70 }], |
| 71 ], | 71 ], |
| 72 # Enable to use the system stlport, otherwise statically | |
| 73 # link the NDK one? | |
| 74 'use_system_stlport%': '<(android_webview_build)', | |
| 75 'android_stlport_library': 'stlport_static', | 72 'android_stlport_library': 'stlport_static', |
| 76 }, # variables | 73 }, # variables |
| 77 'target_defaults': { | 74 'target_defaults': { |
| 78 'defines': [ | 75 'defines': [ |
| 79 'ANDROID', | 76 'ANDROID', |
| 80 'V8_ANDROID_LOG_STDOUT', | 77 'V8_ANDROID_LOG_STDOUT', |
| 81 ], | 78 ], |
| 82 'configurations': { | 79 'configurations': { |
| 83 'Release': { | 80 'Release': { |
| 84 'cflags': [ | 81 'cflags': [ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 101 'cflags': [ | 98 'cflags': [ |
| 102 '-ffunction-sections', | 99 '-ffunction-sections', |
| 103 '-funwind-tables', | 100 '-funwind-tables', |
| 104 '-fstack-protector', | 101 '-fstack-protector', |
| 105 '-fno-short-enums', | 102 '-fno-short-enums', |
| 106 '-finline-limit=64', | 103 '-finline-limit=64', |
| 107 '-Wa,--noexecstack', | 104 '-Wa,--noexecstack', |
| 108 # Note: This include is in cflags to ensure that it comes after | 105 # Note: This include is in cflags to ensure that it comes after |
| 109 # all of the includes. | 106 # all of the includes. |
| 110 '-I<(android_include)', | 107 '-I<(android_include)', |
| 108 '-I<(android_stlport_include)', |
| 111 ], | 109 ], |
| 112 'cflags_cc': [ | 110 'cflags_cc': [ |
| 113 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. | 111 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. |
| 114 ], | 112 ], |
| 115 'defines': [ | 113 'defines': [ |
| 116 'ANDROID', | 114 'ANDROID', |
| 117 #'__GNU_SOURCE=1', # Necessary for clone() | 115 #'__GNU_SOURCE=1', # Necessary for clone() |
| 118 'USE_STLPORT=1', | 116 'USE_STLPORT=1', |
| 119 '_STLP_USE_PTR_SPECIALIZATIONS=1', | 117 '_STLP_USE_PTR_SPECIALIZATIONS=1', |
| 120 'HAVE_OFF64_T', | 118 'HAVE_OFF64_T', |
| 121 'HAVE_SYS_UIO_H', | 119 'HAVE_SYS_UIO_H', |
| 122 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize. | 120 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize. |
| 123 ], | 121 ], |
| 124 'ldflags!': [ | 122 'ldflags!': [ |
| 125 '-pthread', # Not supported by Android toolchain. | 123 '-pthread', # Not supported by Android toolchain. |
| 126 ], | 124 ], |
| 127 'ldflags': [ | 125 'ldflags': [ |
| 128 '-nostdlib', | 126 '-nostdlib', |
| 129 '-Wl,--no-undefined', | 127 '-Wl,--no-undefined', |
| 128 '-Wl,-rpath-link=<(android_lib)', |
| 129 '-L<(android_lib)', |
| 130 ], | 130 ], |
| 131 'libraries!': [ | 131 'libraries!': [ |
| 132 '-lrt', # librt is built into Bionic. | 132 '-lrt', # librt is built into Bionic. |
| 133 # Not supported by Android toolchain. | 133 # Not supported by Android toolchain. |
| 134 # Where do these come from? Can't find references in | 134 # Where do these come from? Can't find references in |
| 135 # any Chromium gyp or gypi file. Maybe they come from | 135 # any Chromium gyp or gypi file. Maybe they come from |
| 136 # gyp itself? | 136 # gyp itself? |
| 137 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4'
, '-lnspr4', | 137 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4'
, '-lnspr4', |
| 138 ], | 138 ], |
| 139 'libraries': [ | 139 'libraries': [ |
| 140 '-l<(android_stlport_library)', | 140 '-l<(android_stlport_library)', |
| 141 # Manually link the libgcc.a that the cross compiler uses. | 141 # Manually link the libgcc.a that the cross compiler uses. |
| 142 '<!($CC -print-libgcc-file-name)', | 142 '<!($CC -print-libgcc-file-name)', |
| 143 '-lc', | 143 '-lc', |
| 144 '-ldl', | 144 '-ldl', |
| 145 '-lstdc++', | 145 '-lstdc++', |
| 146 '-lm', | 146 '-lm', |
| 147 ], | 147 ], |
| 148 'conditions': [ | 148 'conditions': [ |
| 149 ['android_webview_build==0', { | |
| 150 'ldflags': [ | |
| 151 '-Wl,-rpath-link=<(android_lib)', | |
| 152 '-L<(android_lib)', | |
| 153 ], | |
| 154 }], | |
| 155 ['target_arch == "arm"', { | 149 ['target_arch == "arm"', { |
| 156 'ldflags': [ | 150 'ldflags': [ |
| 157 # Enable identical code folding to reduce size. | 151 # Enable identical code folding to reduce size. |
| 158 '-Wl,--icf=safe', | 152 '-Wl,--icf=safe', |
| 159 ], | 153 ], |
| 160 }], | 154 }], |
| 161 ['target_arch=="arm" and arm_version==7', { | 155 ['target_arch=="arm" and arm_version==7', { |
| 162 'cflags': [ | 156 'cflags': [ |
| 163 '-march=armv7-a', | 157 '-march=armv7-a', |
| 164 '-mtune=cortex-a8', | 158 '-mtune=cortex-a8', |
| 165 '-mfpu=vfp3', | 159 '-mfpu=vfp3', |
| 166 ], | 160 ], |
| 161 'ldflags': [ |
| 162 '-L<(android_stlport_libs)/armeabi-v7a', |
| 163 ], |
| 167 }], | 164 }], |
| 168 # NOTE: The stlport header include paths below are specified in | 165 ['target_arch=="arm" and arm_version < 7', { |
| 169 # cflags rather than include_dirs because they need to come | 166 'ldflags': [ |
| 170 # after include_dirs. Think of them like system headers, but | 167 '-L<(android_stlport_libs)/armeabi', |
| 171 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 | |
| 172 # toolchain (circa Gingerbread) will exhibit strange errors. | |
| 173 # The include ordering here is important; change with caution. | |
| 174 ['use_system_stlport==0', { | |
| 175 'cflags': [ | |
| 176 '-I<(android_stlport_include)', | |
| 177 ], | 168 ], |
| 178 'conditions': [ | 169 }], |
| 179 ['target_arch=="arm" and arm_version==7', { | 170 ['target_arch=="x64"', { |
| 180 'ldflags': [ | 171 'ldflags': [ |
| 181 '-L<(android_stlport_libs)/armeabi-v7a', | 172 '-L<(android_stlport_libs)/x86_64', |
| 182 ], | 173 ], |
| 183 }], | 174 }], |
| 184 ['target_arch=="arm" and arm_version < 7', { | 175 ['target_arch=="arm64"', { |
| 185 'ldflags': [ | 176 'ldflags': [ |
| 186 '-L<(android_stlport_libs)/armeabi', | 177 '-L<(android_stlport_libs)/arm64-v8a', |
| 187 ], | |
| 188 }], | |
| 189 ['target_arch=="mipsel"', { | |
| 190 'ldflags': [ | |
| 191 '-L<(android_stlport_libs)/mips', | |
| 192 ], | |
| 193 }], | |
| 194 ['target_arch=="ia32" or target_arch=="x87"', { | |
| 195 'ldflags': [ | |
| 196 '-L<(android_stlport_libs)/x86', | |
| 197 ], | |
| 198 }], | |
| 199 ['target_arch=="x64"', { | |
| 200 'ldflags': [ | |
| 201 '-L<(android_stlport_libs)/x86_64', | |
| 202 ], | |
| 203 }], | |
| 204 ['target_arch=="arm64"', { | |
| 205 'ldflags': [ | |
| 206 '-L<(android_stlport_libs)/arm64-v8a', | |
| 207 ], | |
| 208 }], | |
| 209 ], | 178 ], |
| 210 }], | 179 }], |
| 211 ['target_arch=="ia32" or target_arch=="x87"', { | 180 ['target_arch=="ia32" or target_arch=="x87"', { |
| 212 # The x86 toolchain currently has problems with stack-protector. | 181 # The x86 toolchain currently has problems with stack-protector. |
| 213 'cflags!': [ | 182 'cflags!': [ |
| 214 '-fstack-protector', | 183 '-fstack-protector', |
| 215 ], | 184 ], |
| 216 'cflags': [ | 185 'cflags': [ |
| 217 '-fno-stack-protector', | 186 '-fno-stack-protector', |
| 218 ], | 187 ], |
| 188 'ldflags': [ |
| 189 '-L<(android_stlport_libs)/x86', |
| 190 ], |
| 219 }], | 191 }], |
| 220 ['target_arch=="mipsel"', { | 192 ['target_arch=="mipsel"', { |
| 221 # The mips toolchain currently has problems with stack-protector. | 193 # The mips toolchain currently has problems with stack-protector. |
| 222 'cflags!': [ | 194 'cflags!': [ |
| 223 '-fstack-protector', | 195 '-fstack-protector', |
| 224 '-U__linux__' | 196 '-U__linux__' |
| 225 ], | 197 ], |
| 226 'cflags': [ | 198 'cflags': [ |
| 227 '-fno-stack-protector', | 199 '-fno-stack-protector', |
| 228 ], | 200 ], |
| 201 'ldflags': [ |
| 202 '-L<(android_stlport_libs)/mips', |
| 203 ], |
| 229 }], | 204 }], |
| 230 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64") a
nd component!="shared_library"', { | 205 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64") a
nd component!="shared_library"', { |
| 231 'cflags': [ | 206 'cflags': [ |
| 232 '-fPIE', | 207 '-fPIE', |
| 233 ], | 208 ], |
| 234 'ldflags': [ | 209 'ldflags': [ |
| 235 '-pie', | 210 '-pie', |
| 236 ], | 211 ], |
| 237 }], | 212 }], |
| 238 ], | 213 ], |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 'ldflags!': [ | 257 'ldflags!': [ |
| 283 '-Wl,-z,noexecstack', | 258 '-Wl,-z,noexecstack', |
| 284 '-Wl,--gc-sections', | 259 '-Wl,--gc-sections', |
| 285 '-Wl,-O1', | 260 '-Wl,-O1', |
| 286 '-Wl,--as-needed', | 261 '-Wl,--as-needed', |
| 287 ], | 262 ], |
| 288 }], | 263 }], |
| 289 ], # target_conditions | 264 ], # target_conditions |
| 290 }, # target_defaults | 265 }, # target_defaults |
| 291 } | 266 } |
| OLD | NEW |