Chromium Code Reviews| 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', | 318 'android_include': '<(android_sysroot)/usr/include', |
| 319 'conditions': [ | 319 'conditions': [ |
| 320 ['target_arch=="x64"', { | 320 ['target_arch=="x64"', { |
| 321 'android_lib': '<(android_sysroot)/usr/lib64', | 321 'android_lib': '<(android_sysroot)/usr/lib64', |
| 322 }, { | 322 }, { |
| 323 'android_lib': '<(android_sysroot)/usr/lib', | 323 'android_lib': '<(android_sysroot)/usr/lib', |
| 324 }], | 324 }], |
| 325 ], | 325 ], |
| 326 'android_stlport_include': '<(android_stlport)/stlport', | 326 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include ', |
| 327 'android_stlport_libs': '<(android_stlport)/libs', | 327 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxa bi/include', |
| 328 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', | |
| 329 'android_support_include': '<(android_toolchain)/sources/android/sup port/include', | |
| 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', | 335 'android_include': '<(android_sysroot)/usr/include', |
| 334 'conditions': [ | 336 'conditions': [ |
| 335 ['target_arch=="x64"', { | 337 ['target_arch=="x64"', { |
| 336 'android_lib': '<(android_sysroot)/usr/lib64', | 338 'android_lib': '<(android_sysroot)/usr/lib64', |
| 337 }, { | 339 }, { |
| 338 'android_lib': '<(android_sysroot)/usr/lib', | 340 'android_lib': '<(android_sysroot)/usr/lib', |
| 339 }], | 341 }], |
| 340 ], | 342 ], |
| 341 'android_stlport_include': '<(android_stlport)/stlport', | 343 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include ', |
| 342 'android_stlport_libs': '<(android_stlport)/libs', | 344 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxa bi/include', |
| 345 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs', | |
| 346 'android_support_include': '<(android_ndk_root)/sources/android/supp ort/include', | |
| 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=c++11' ], |
|
Nico
2016/01/26 15:02:57
Do you need gnu++11 instead of c++11 maybe? In Chr
| |
| 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 # Note: This include is in cflags to ensure that it comes after |
| 1026 # all of the includes. | 1026 # all of the includes. |
| 1027 '-I<(android_include)', | 1027 '-I<(android_include)', |
|
Nico
2016/01/26 15:02:57
I think the problem is this line. We don't add and
Michael Achenbach
2016/01/29 08:30:22
Tried all combinations locally. The one you see he
| |
| 1028 '-I<(android_stlport_include)', | 1028 '-isystem<(android_libcpp_include)', |
| 1029 ], | 1029 '-isystem<(android_libcpp_abi_include)', |
| 1030 'cflags_cc': [ | 1030 '-isystem<(android_support_include)', |
| 1031 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. | |
| 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': [ |
| 1046 '-nostdlib', | 1043 '-nostdlib', |
| 1047 '-Wl,--no-undefined', | 1044 '-Wl,--no-undefined', |
| 1048 '-Wl,-rpath-link=<(android_lib)', | 1045 '-Wl,-rpath-link=<(android_lib)', |
| 1049 '-L<(android_lib)', | 1046 '-L<(android_lib)', |
| 1050 ], | 1047 ], |
| 1051 'libraries!': [ | 1048 'libraries!': [ |
| 1052 '-lrt', # librt is built into Bionic. | 1049 '-lrt', # librt is built into Bionic. |
| 1053 # Not supported by Android toolchain. | 1050 # Not supported by Android toolchain. |
| 1054 # Where do these come from? Can't find references in | 1051 # Where do these come from? Can't find references in |
| 1055 # any Chromium gyp or gypi file. Maybe they come from | 1052 # any Chromium gyp or gypi file. Maybe they come from |
| 1056 # gyp itself? | 1053 # gyp itself? |
| 1057 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp lc4', '-lnspr4', | 1054 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp lc4', '-lnspr4', |
| 1058 ], | 1055 ], |
| 1059 'libraries': [ | 1056 'libraries': [ |
| 1060 '-l<(android_stlport_library)', | 1057 '-l<(android_libcpp_library)', |
| 1058 '-latomic', | |
| 1061 # Manually link the libgcc.a that the cross compiler uses. | 1059 # Manually link the libgcc.a that the cross compiler uses. |
| 1062 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | 1060 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
| 1063 '-lc', | 1061 '-lc', |
| 1064 '-ldl', | 1062 '-ldl', |
| 1065 '-lstdc++', | |
| 1066 '-lm', | 1063 '-lm', |
| 1067 ], | 1064 ], |
| 1068 'conditions': [ | 1065 'conditions': [ |
| 1069 ['target_arch == "arm"', { | 1066 ['target_arch == "arm"', { |
| 1070 'ldflags': [ | 1067 'ldflags': [ |
| 1071 # Enable identical code folding to reduce size. | 1068 # Enable identical code folding to reduce size. |
| 1072 '-Wl,--icf=safe', | 1069 '-Wl,--icf=safe', |
| 1073 ], | 1070 ], |
| 1074 }], | 1071 }], |
| 1075 ['target_arch=="arm" and arm_version==7', { | 1072 ['target_arch=="arm" and arm_version==7', { |
| 1076 'cflags': [ | 1073 'cflags': [ |
| 1077 '-march=armv7-a', | 1074 '-march=armv7-a', |
| 1078 '-mtune=cortex-a8', | 1075 '-mtune=cortex-a8', |
| 1079 '-mfpu=vfp3', | 1076 '-mfpu=vfp3', |
| 1080 ], | 1077 ], |
| 1081 'ldflags': [ | 1078 'ldflags': [ |
| 1082 '-L<(android_stlport_libs)/armeabi-v7a', | 1079 '-L<(android_libcpp_libs)/armeabi-v7a', |
| 1083 ], | 1080 ], |
| 1084 }], | 1081 }], |
| 1085 ['target_arch=="arm" and arm_version < 7', { | 1082 ['target_arch=="arm" and arm_version < 7', { |
| 1086 'ldflags': [ | 1083 'ldflags': [ |
| 1087 '-L<(android_stlport_libs)/armeabi', | 1084 '-L<(android_libcpp_libs)/armeabi', |
| 1088 ], | 1085 ], |
| 1089 }], | 1086 }], |
| 1090 ['target_arch=="x64"', { | 1087 ['target_arch=="x64"', { |
| 1091 'ldflags': [ | 1088 'ldflags': [ |
| 1092 '-L<(android_stlport_libs)/x86_64', | 1089 '-L<(android_libcpp_libs)/x86_64', |
| 1093 ], | 1090 ], |
| 1094 }], | 1091 }], |
| 1095 ['target_arch=="arm64"', { | 1092 ['target_arch=="arm64"', { |
| 1096 'ldflags': [ | 1093 'ldflags': [ |
| 1097 '-L<(android_stlport_libs)/arm64-v8a', | 1094 '-L<(android_libcpp_libs)/arm64-v8a', |
| 1098 ], | 1095 ], |
| 1099 }], | 1096 }], |
| 1100 ['target_arch=="ia32" or target_arch=="x87"', { | 1097 ['target_arch=="ia32" or target_arch=="x87"', { |
| 1101 # The x86 toolchain currently has problems with stack-protector. | 1098 # The x86 toolchain currently has problems with stack-protector. |
| 1102 'cflags!': [ | 1099 'cflags!': [ |
| 1103 '-fstack-protector', | 1100 '-fstack-protector', |
| 1104 ], | 1101 ], |
| 1105 'cflags': [ | 1102 'cflags': [ |
| 1106 '-fno-stack-protector', | 1103 '-fno-stack-protector', |
| 1107 ], | 1104 ], |
| 1108 'ldflags': [ | 1105 'ldflags': [ |
| 1109 '-L<(android_stlport_libs)/x86', | 1106 '-L<(android_libcpp_libs)/x86', |
| 1110 ], | 1107 ], |
| 1111 }], | 1108 }], |
| 1112 ['target_arch=="mipsel"', { | 1109 ['target_arch=="mipsel"', { |
| 1113 # The mips toolchain currently has problems with stack-protector . | 1110 # The mips toolchain currently has problems with stack-protector . |
| 1114 'cflags!': [ | 1111 'cflags!': [ |
| 1115 '-fstack-protector', | 1112 '-fstack-protector', |
| 1116 '-U__linux__' | 1113 '-U__linux__' |
| 1117 ], | 1114 ], |
| 1118 'cflags': [ | 1115 'cflags': [ |
| 1119 '-fno-stack-protector', | 1116 '-fno-stack-protector', |
| 1120 ], | 1117 ], |
| 1121 'ldflags': [ | 1118 'ldflags': [ |
| 1122 '-L<(android_stlport_libs)/mips', | 1119 '-L<(android_libcpp_libs)/mips', |
| 1123 ], | 1120 ], |
| 1124 }], | 1121 }], |
| 1125 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64 " or target_arch=="ia32") and component!="shared_library"', { | 1122 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64 " or target_arch=="ia32") and component!="shared_library"', { |
| 1126 'cflags': [ | 1123 'cflags': [ |
| 1127 '-fPIE', | 1124 '-fPIE', |
| 1128 ], | 1125 ], |
| 1129 'ldflags': [ | 1126 'ldflags': [ |
| 1130 '-pie', | 1127 '-pie', |
| 1131 ], | 1128 ], |
| 1132 }], | 1129 }], |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1361 '-fsanitize=cfi-vcall', | 1358 '-fsanitize=cfi-vcall', |
| 1362 '-fsanitize=cfi-derived-cast', | 1359 '-fsanitize=cfi-derived-cast', |
| 1363 '-fsanitize=cfi-unrelated-cast', | 1360 '-fsanitize=cfi-unrelated-cast', |
| 1364 ], | 1361 ], |
| 1365 }], | 1362 }], |
| 1366 ], | 1363 ], |
| 1367 }, | 1364 }, |
| 1368 }], | 1365 }], |
| 1369 ], | 1366 ], |
| 1370 } | 1367 } |
| OLD | NEW |