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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 'android_target_arch%': '<(android_target_arch)', | 306 'android_target_arch%': '<(android_target_arch)', |
307 'android_target_platform%': '<(android_target_platform)', | 307 'android_target_platform%': '<(android_target_platform)', |
308 'android_toolchain%': '<(android_toolchain)', | 308 'android_toolchain%': '<(android_toolchain)', |
309 'arm_version%': '<(arm_version)', | 309 'arm_version%': '<(arm_version)', |
310 'host_os%': '<(host_os)', | 310 'host_os%': '<(host_os)', |
311 | 311 |
312 'conditions': [ | 312 'conditions': [ |
313 ['android_ndk_root==""', { | 313 ['android_ndk_root==""', { |
314 'variables': { | 314 'variables': { |
315 'android_sysroot': '<(android_toolchain)/sysroot/', | 315 'android_sysroot': '<(android_toolchain)/sysroot/', |
316 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/'
, | 316 'android_stl': '<(android_toolchain)/sources/cxx-stl/', |
317 }, | 317 }, |
318 'android_include': '<(android_sysroot)/usr/include', | |
319 'conditions': [ | 318 'conditions': [ |
320 ['target_arch=="x64"', { | 319 ['target_arch=="x64"', { |
321 'android_lib': '<(android_sysroot)/usr/lib64', | 320 'android_lib': '<(android_sysroot)/usr/lib64', |
322 }, { | 321 }, { |
323 'android_lib': '<(android_sysroot)/usr/lib', | 322 'android_lib': '<(android_sysroot)/usr/lib', |
324 }], | 323 }], |
325 ], | 324 ], |
326 'android_stlport_include': '<(android_stlport)/stlport', | 325 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include
', |
327 'android_stlport_libs': '<(android_stlport)/libs', | 326 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxa
bi/include', |
| 327 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', |
| 328 'android_support_include': '<(android_toolchain)/sources/android/sup
port/include', |
| 329 'android_sysroot': '<(android_sysroot)', |
328 }, { | 330 }, { |
329 'variables': { | 331 'variables': { |
330 'android_sysroot': '<(android_ndk_root)/platforms/android-<(androi
d_target_platform)/arch-<(android_target_arch)', | 332 'android_sysroot': '<(android_ndk_root)/platforms/android-<(androi
d_target_platform)/arch-<(android_target_arch)', |
331 'android_stlport': '<(android_ndk_root)/sources/cxx-stl/stlport/', | 333 'android_stl': '<(android_ndk_root)/sources/cxx-stl/', |
332 }, | 334 }, |
333 'android_include': '<(android_sysroot)/usr/include', | |
334 'conditions': [ | 335 'conditions': [ |
335 ['target_arch=="x64"', { | 336 ['target_arch=="x64"', { |
336 'android_lib': '<(android_sysroot)/usr/lib64', | 337 'android_lib': '<(android_sysroot)/usr/lib64', |
337 }, { | 338 }, { |
338 'android_lib': '<(android_sysroot)/usr/lib', | 339 'android_lib': '<(android_sysroot)/usr/lib', |
339 }], | 340 }], |
340 ], | 341 ], |
341 'android_stlport_include': '<(android_stlport)/stlport', | 342 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include
', |
342 'android_stlport_libs': '<(android_stlport)/libs', | 343 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxa
bi/include', |
| 344 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', |
| 345 'android_support_include': '<(android_ndk_root)/sources/android/supp
ort/include', |
| 346 'android_sysroot': '<(android_sysroot)', |
343 }], | 347 }], |
344 ], | 348 ], |
345 'android_stlport_library': 'stlport_static', | 349 'android_libcpp_library': 'c++_static', |
346 }], # OS=="android" | 350 }], # OS=="android" |
347 ['host_clang==1', { | 351 ['host_clang==1', { |
348 'host_cc': '<(clang_dir)/bin/clang', | 352 'host_cc': '<(clang_dir)/bin/clang', |
349 'host_cxx': '<(clang_dir)/bin/clang++', | 353 'host_cxx': '<(clang_dir)/bin/clang++', |
350 }, { | 354 }, { |
351 'host_cc': '<!(which gcc)', | 355 'host_cc': '<!(which gcc)', |
352 'host_cxx': '<!(which g++)', | 356 'host_cxx': '<!(which g++)', |
353 }], | 357 }], |
354 ], | 358 ], |
355 # Default ARM variable settings. | 359 # Default ARM variable settings. |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 ], | 1002 ], |
999 'configurations': { | 1003 'configurations': { |
1000 'Release': { | 1004 'Release': { |
1001 'cflags': [ | 1005 'cflags': [ |
1002 '-fomit-frame-pointer', | 1006 '-fomit-frame-pointer', |
1003 ], | 1007 ], |
1004 }, # Release | 1008 }, # Release |
1005 }, # configurations | 1009 }, # configurations |
1006 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter'], | 1010 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter'], |
1007 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions', | 1011 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions', |
1008 # Note: Using -std=c++0x will define __STRICT_ANSI__, whi
ch | 1012 '-std=gnu++11' ], |
1009 # in turn will leave out some template stuff for 'long | |
1010 # long'. What we want is -std=c++11, but this is not | |
1011 # supported by GCC 4.6 or Xcode 4.2 | |
1012 '-std=gnu++0x' ], | |
1013 'target_conditions': [ | 1013 'target_conditions': [ |
1014 ['_toolset=="target"', { | 1014 ['_toolset=="target"', { |
1015 'cflags!': [ | 1015 'cflags!': [ |
1016 '-pthread', # Not supported by Android toolchain. | 1016 '-pthread', # Not supported by Android toolchain. |
1017 ], | 1017 ], |
1018 'cflags': [ | 1018 'cflags': [ |
1019 '-ffunction-sections', | 1019 '-ffunction-sections', |
1020 '-funwind-tables', | 1020 '-funwind-tables', |
1021 '-fstack-protector', | 1021 '-fstack-protector', |
1022 '-fno-short-enums', | 1022 '-fno-short-enums', |
1023 '-finline-limit=64', | 1023 '-finline-limit=64', |
1024 '-Wa,--noexecstack', | 1024 '-Wa,--noexecstack', |
1025 # Note: This include is in cflags to ensure that it comes after | 1025 '--sysroot=<(android_sysroot)', |
1026 # all of the includes. | |
1027 '-I<(android_include)', | |
1028 '-I<(android_stlport_include)', | |
1029 ], | 1026 ], |
1030 'cflags_cc': [ | 1027 'cflags_cc': [ |
1031 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. | 1028 '-isystem<(android_libcpp_include)', |
| 1029 '-isystem<(android_libcpp_abi_include)', |
| 1030 '-isystem<(android_support_include)', |
1032 ], | 1031 ], |
1033 'defines': [ | 1032 'defines': [ |
1034 'ANDROID', | 1033 'ANDROID', |
1035 #'__GNU_SOURCE=1', # Necessary for clone() | 1034 #'__GNU_SOURCE=1', # Necessary for clone() |
1036 'USE_STLPORT=1', | |
1037 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
1038 'HAVE_OFF64_T', | 1035 'HAVE_OFF64_T', |
1039 'HAVE_SYS_UIO_H', | 1036 'HAVE_SYS_UIO_H', |
1040 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize
. | 1037 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize
. |
1041 ], | 1038 ], |
1042 'ldflags!': [ | 1039 'ldflags!': [ |
1043 '-pthread', # Not supported by Android toolchain. | 1040 '-pthread', # Not supported by Android toolchain. |
1044 ], | 1041 ], |
1045 'ldflags': [ | 1042 'ldflags': [ |
| 1043 '-Wl,--no-undefined', |
| 1044 '--sysroot=<(android_sysroot)', |
1046 '-nostdlib', | 1045 '-nostdlib', |
1047 '-Wl,--no-undefined', | |
1048 '-Wl,-rpath-link=<(android_lib)', | |
1049 '-L<(android_lib)', | |
1050 ], | 1046 ], |
1051 'libraries!': [ | 1047 'libraries!': [ |
1052 '-lrt', # librt is built into Bionic. | 1048 '-lrt', # librt is built into Bionic. |
1053 # Not supported by Android toolchain. | 1049 # Not supported by Android toolchain. |
1054 # Where do these come from? Can't find references in | 1050 # Where do these come from? Can't find references in |
1055 # any Chromium gyp or gypi file. Maybe they come from | 1051 # any Chromium gyp or gypi file. Maybe they come from |
1056 # gyp itself? | 1052 # gyp itself? |
1057 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp
lc4', '-lnspr4', | 1053 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp
lc4', '-lnspr4', |
1058 ], | 1054 ], |
1059 'libraries': [ | 1055 'libraries': [ |
1060 '-l<(android_stlport_library)', | 1056 '-l<(android_libcpp_library)', |
| 1057 '-latomic', |
1061 # Manually link the libgcc.a that the cross compiler uses. | 1058 # Manually link the libgcc.a that the cross compiler uses. |
1062 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 1059 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
1063 '-lc', | 1060 '-lc', |
1064 '-ldl', | 1061 '-ldl', |
1065 '-lstdc++', | |
1066 '-lm', | 1062 '-lm', |
1067 ], | 1063 ], |
1068 'conditions': [ | 1064 'conditions': [ |
1069 ['target_arch == "arm"', { | 1065 ['target_arch == "arm"', { |
1070 'ldflags': [ | 1066 'ldflags': [ |
1071 # Enable identical code folding to reduce size. | 1067 # Enable identical code folding to reduce size. |
1072 '-Wl,--icf=safe', | 1068 '-Wl,--icf=safe', |
1073 ], | 1069 ], |
1074 }], | 1070 }], |
1075 ['target_arch=="arm" and arm_version==7', { | 1071 ['target_arch=="arm" and arm_version==7', { |
1076 'cflags': [ | 1072 'cflags': [ |
1077 '-march=armv7-a', | 1073 '-march=armv7-a', |
1078 '-mtune=cortex-a8', | 1074 '-mtune=cortex-a8', |
1079 '-mfpu=vfp3', | 1075 '-mfpu=vfp3', |
1080 ], | 1076 ], |
1081 'ldflags': [ | 1077 'ldflags': [ |
1082 '-L<(android_stlport_libs)/armeabi-v7a', | 1078 '-L<(android_libcpp_libs)/armeabi-v7a', |
1083 ], | 1079 ], |
1084 }], | 1080 }], |
1085 ['target_arch=="arm" and arm_version < 7', { | 1081 ['target_arch=="arm" and arm_version < 7', { |
1086 'ldflags': [ | 1082 'ldflags': [ |
1087 '-L<(android_stlport_libs)/armeabi', | 1083 '-L<(android_libcpp_libs)/armeabi', |
1088 ], | 1084 ], |
1089 }], | 1085 }], |
1090 ['target_arch=="x64"', { | 1086 ['target_arch=="x64"', { |
1091 'ldflags': [ | 1087 'ldflags': [ |
1092 '-L<(android_stlport_libs)/x86_64', | 1088 '-L<(android_libcpp_libs)/x86_64', |
1093 ], | 1089 ], |
1094 }], | 1090 }], |
1095 ['target_arch=="arm64"', { | 1091 ['target_arch=="arm64"', { |
1096 'ldflags': [ | 1092 'ldflags': [ |
1097 '-L<(android_stlport_libs)/arm64-v8a', | 1093 '-L<(android_libcpp_libs)/arm64-v8a', |
1098 ], | 1094 ], |
1099 }], | 1095 }], |
1100 ['target_arch=="ia32" or target_arch=="x87"', { | 1096 ['target_arch=="ia32" or target_arch=="x87"', { |
1101 # The x86 toolchain currently has problems with stack-protector. | 1097 # The x86 toolchain currently has problems with stack-protector. |
1102 'cflags!': [ | 1098 'cflags!': [ |
1103 '-fstack-protector', | 1099 '-fstack-protector', |
1104 ], | 1100 ], |
1105 'cflags': [ | 1101 'cflags': [ |
1106 '-fno-stack-protector', | 1102 '-fno-stack-protector', |
1107 ], | 1103 ], |
1108 'ldflags': [ | 1104 'ldflags': [ |
1109 '-L<(android_stlport_libs)/x86', | 1105 '-L<(android_libcpp_libs)/x86', |
1110 ], | 1106 ], |
1111 }], | 1107 }], |
1112 ['target_arch=="mipsel"', { | 1108 ['target_arch=="mipsel"', { |
1113 # The mips toolchain currently has problems with stack-protector
. | 1109 # The mips toolchain currently has problems with stack-protector
. |
1114 'cflags!': [ | 1110 'cflags!': [ |
1115 '-fstack-protector', | 1111 '-fstack-protector', |
1116 '-U__linux__' | 1112 '-U__linux__' |
1117 ], | 1113 ], |
1118 'cflags': [ | 1114 'cflags': [ |
1119 '-fno-stack-protector', | 1115 '-fno-stack-protector', |
1120 ], | 1116 ], |
1121 'ldflags': [ | 1117 'ldflags': [ |
1122 '-L<(android_stlport_libs)/mips', | 1118 '-L<(android_libcpp_libs)/mips', |
1123 ], | 1119 ], |
1124 }], | 1120 }], |
1125 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64
" or target_arch=="ia32") and component!="shared_library"', { | 1121 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64
" or target_arch=="ia32") and component!="shared_library"', { |
1126 'cflags': [ | 1122 'cflags': [ |
1127 '-fPIE', | 1123 '-fPIE', |
1128 ], | 1124 ], |
1129 'ldflags': [ | 1125 'ldflags': [ |
1130 '-pie', | 1126 '-pie', |
1131 ], | 1127 ], |
1132 }], | 1128 }], |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 '-fsanitize=cfi-vcall', | 1357 '-fsanitize=cfi-vcall', |
1362 '-fsanitize=cfi-derived-cast', | 1358 '-fsanitize=cfi-derived-cast', |
1363 '-fsanitize=cfi-unrelated-cast', | 1359 '-fsanitize=cfi-unrelated-cast', |
1364 ], | 1360 ], |
1365 }], | 1361 }], |
1366 ], | 1362 ], |
1367 }, | 1363 }, |
1368 }], | 1364 }], |
1369 ], | 1365 ], |
1370 } | 1366 } |
OLD | NEW |