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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 ['msan==1', { | 198 ['msan==1', { |
199 # Use a just-built, MSan-instrumented libc++ instead of the system-wide | 199 # Use a just-built, MSan-instrumented libc++ instead of the system-wide |
200 # libstdc++. This is required to avoid false positive reports whenever | 200 # libstdc++. This is required to avoid false positive reports whenever |
201 # the C++ standard library is used. | 201 # the C++ standard library is used. |
202 'use_custom_libcxx%': 1, | 202 'use_custom_libcxx%': 1, |
203 }], | 203 }], |
204 ['OS=="linux" and v8_target_arch==host_arch', { | 204 ['OS=="linux" and v8_target_arch==host_arch', { |
205 # Gradually roll out v8_use_external_startup_data. | 205 # Gradually roll out v8_use_external_startup_data. |
206 # Should eventually be default enabled on all platforms. | 206 # Should eventually be default enabled on all platforms. |
207 'v8_use_external_startup_data%': 1, | 207 'v8_use_external_startup_data%': 1, |
208 }], | 208 }], |
Michael Achenbach
2015/06/22 12:31:32
1:1 from android.gypi
| |
209 ['OS=="android"', { | |
210 # Location of Android NDK. | |
211 'variables': { | |
212 'variables': { | |
213 # The Android toolchain needs to use the absolute path to the NDK | |
214 # because it is used at different levels in the GYP files. | |
215 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_ tools/ndk/', | |
216 'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')", | |
217 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", | |
218 }, | |
219 | |
220 # Copy conditionally-set variables out one scope. | |
221 'android_ndk_root%': '<(android_ndk_root)', | |
222 | |
223 'conditions': [ | |
224 ['target_arch == "ia32"', { | |
225 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/preb uilt/<(host_os)-<(android_host_arch)/bin', | |
226 }], | |
227 ['target_arch == "x64"', { | |
228 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/p rebuilt/<(host_os)-<(android_host_arch)/bin', | |
229 }], | |
230 ['target_arch=="arm"', { | |
231 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-an droideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | |
232 }], | |
233 ['target_arch == "arm64"', { | |
234 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linu x-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | |
235 }], | |
236 ['target_arch == "mipsel"', { | |
237 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux -android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | |
238 }], | |
239 ['target_arch == "mips64el"', { | |
240 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-lin ux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | |
241 }], | |
242 ], | |
243 }, | |
244 | |
245 'conditions': [ | |
246 ['android_ndk_root==""', { | |
247 'variables': { | |
248 'android_sysroot': '<(android_toolchain)/sysroot/', | |
249 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/' , | |
250 }, | |
251 'android_include': '<(android_sysroot)/usr/include', | |
252 'conditions': [ | |
253 ['target_arch=="x64"', { | |
254 'android_lib': '<(android_sysroot)/usr/lib64', | |
255 }, { | |
256 'android_lib': '<(android_sysroot)/usr/lib', | |
257 }], | |
258 ], | |
259 'android_stlport_include': '<(android_stlport)/stlport', | |
260 'android_stlport_libs': '<(android_stlport)/libs', | |
261 }, { | |
262 'variables': { | |
263 'android_sysroot': '<(android_ndk_root)/platforms/android-<(androi d_target_platform)/arch-<(android_target_arch)', | |
264 'android_stlport': '<(android_ndk_root)/sources/cxx-stl/stlport/', | |
265 }, | |
266 'android_include': '<(android_sysroot)/usr/include', | |
267 'conditions': [ | |
268 ['target_arch=="x64"', { | |
269 'android_lib': '<(android_sysroot)/usr/lib64', | |
270 }, { | |
271 'android_lib': '<(android_sysroot)/usr/lib', | |
272 }], | |
273 ], | |
274 'android_stlport_include': '<(android_stlport)/stlport', | |
275 'android_stlport_libs': '<(android_stlport)/libs', | |
276 }], | |
277 ], | |
278 'android_stlport_library': 'stlport_static', | |
279 }], # OS=="android" | |
209 ], | 280 ], |
210 # Default ARM variable settings. | 281 # Default ARM variable settings. |
211 'arm_version%': 'default', | 282 'arm_version%': 'default', |
212 'arm_fpu%': 'vfpv3', | 283 'arm_fpu%': 'vfpv3', |
213 'arm_float_abi%': 'default', | 284 'arm_float_abi%': 'default', |
214 'arm_thumb': 'default', | 285 'arm_thumb': 'default', |
215 | 286 |
216 # Default MIPS variable settings. | 287 # Default MIPS variable settings. |
217 'mips_arch_variant%': 'r2', | 288 'mips_arch_variant%': 'r2', |
218 # Possible values fp32, fp64, fpxx. | 289 # Possible values fp32, fp64, fpxx. |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
664 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x | 735 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x |
665 }, | 736 }, |
666 }], | 737 }], |
667 ], | 738 ], |
668 'target_conditions': [ | 739 'target_conditions': [ |
669 ['_type!="static_library"', { | 740 ['_type!="static_library"', { |
670 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, | 741 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
671 }], | 742 }], |
672 ], # target_conditions | 743 ], # target_conditions |
673 }, # target_defaults | 744 }, # target_defaults |
674 }], # OS=="mac" | 745 }], # OS=="mac" |
Michael Achenbach
2015/06/22 12:31:32
1:1 from android.gypi
| |
746 ['OS=="android"', { | |
747 'target_defaults': { | |
748 'defines': [ | |
749 'ANDROID', | |
750 'V8_ANDROID_LOG_STDOUT', | |
751 ], | |
752 'configurations': { | |
753 'Release': { | |
754 'cflags': [ | |
755 '-fomit-frame-pointer', | |
756 ], | |
757 }, # Release | |
758 }, # configurations | |
759 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter'], | |
760 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions', | |
761 # Note: Using -std=c++0x will define __STRICT_ANSI__, whi ch | |
762 # in turn will leave out some template stuff for 'long | |
763 # long'. What we want is -std=c++11, but this is not | |
764 # supported by GCC 4.6 or Xcode 4.2 | |
765 '-std=gnu++0x' ], | |
766 'target_conditions': [ | |
767 ['_toolset=="target"', { | |
768 'cflags!': [ | |
769 '-pthread', # Not supported by Android toolchain. | |
770 ], | |
771 'cflags': [ | |
772 '-ffunction-sections', | |
773 '-funwind-tables', | |
774 '-fstack-protector', | |
775 '-fno-short-enums', | |
776 '-finline-limit=64', | |
777 '-Wa,--noexecstack', | |
778 # Note: This include is in cflags to ensure that it comes after | |
779 # all of the includes. | |
780 '-I<(android_include)', | |
781 '-I<(android_stlport_include)', | |
782 ], | |
783 'cflags_cc': [ | |
784 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. | |
785 ], | |
786 'defines': [ | |
787 'ANDROID', | |
788 #'__GNU_SOURCE=1', # Necessary for clone() | |
789 'USE_STLPORT=1', | |
790 '_STLP_USE_PTR_SPECIALIZATIONS=1', | |
791 'HAVE_OFF64_T', | |
792 'HAVE_SYS_UIO_H', | |
793 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize . | |
794 ], | |
795 'ldflags!': [ | |
796 '-pthread', # Not supported by Android toolchain. | |
797 ], | |
798 'ldflags': [ | |
799 '-nostdlib', | |
800 '-Wl,--no-undefined', | |
801 '-Wl,-rpath-link=<(android_lib)', | |
802 '-L<(android_lib)', | |
803 ], | |
804 'libraries!': [ | |
805 '-lrt', # librt is built into Bionic. | |
806 # Not supported by Android toolchain. | |
807 # Where do these come from? Can't find references in | |
808 # any Chromium gyp or gypi file. Maybe they come from | |
809 # gyp itself? | |
810 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp lc4', '-lnspr4', | |
811 ], | |
812 'libraries': [ | |
813 '-l<(android_stlport_library)', | |
814 # Manually link the libgcc.a that the cross compiler uses. | |
815 '<!($CC -print-libgcc-file-name)', | |
816 '-lc', | |
817 '-ldl', | |
818 '-lstdc++', | |
819 '-lm', | |
820 ], | |
821 'conditions': [ | |
822 ['target_arch == "arm"', { | |
823 'ldflags': [ | |
824 # Enable identical code folding to reduce size. | |
825 '-Wl,--icf=safe', | |
826 ], | |
827 }], | |
828 ['target_arch=="arm" and arm_version==7', { | |
829 'cflags': [ | |
830 '-march=armv7-a', | |
831 '-mtune=cortex-a8', | |
832 '-mfpu=vfp3', | |
833 ], | |
834 'ldflags': [ | |
835 '-L<(android_stlport_libs)/armeabi-v7a', | |
836 ], | |
837 }], | |
838 ['target_arch=="arm" and arm_version < 7', { | |
839 'ldflags': [ | |
840 '-L<(android_stlport_libs)/armeabi', | |
841 ], | |
842 }], | |
843 ['target_arch=="x64"', { | |
844 'ldflags': [ | |
845 '-L<(android_stlport_libs)/x86_64', | |
846 ], | |
847 }], | |
848 ['target_arch=="arm64"', { | |
849 'ldflags': [ | |
850 '-L<(android_stlport_libs)/arm64-v8a', | |
851 ], | |
852 }], | |
853 ['target_arch=="ia32" or target_arch=="x87"', { | |
854 # The x86 toolchain currently has problems with stack-protector. | |
855 'cflags!': [ | |
856 '-fstack-protector', | |
857 ], | |
858 'cflags': [ | |
859 '-fno-stack-protector', | |
860 ], | |
861 'ldflags': [ | |
862 '-L<(android_stlport_libs)/x86', | |
863 ], | |
864 }], | |
865 ['target_arch=="mipsel"', { | |
866 # The mips toolchain currently has problems with stack-protector . | |
867 'cflags!': [ | |
868 '-fstack-protector', | |
869 '-U__linux__' | |
870 ], | |
871 'cflags': [ | |
872 '-fno-stack-protector', | |
873 ], | |
874 'ldflags': [ | |
875 '-L<(android_stlport_libs)/mips', | |
876 ], | |
877 }], | |
878 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64 " or target_arch=="ia32") and component!="shared_library"', { | |
879 'cflags': [ | |
880 '-fPIE', | |
881 ], | |
882 'ldflags': [ | |
883 '-pie', | |
884 ], | |
885 }], | |
886 ], | |
887 'target_conditions': [ | |
888 ['_type=="executable"', { | |
889 'conditions': [ | |
890 ['target_arch=="arm64" or target_arch=="x64"', { | |
891 'ldflags': [ | |
892 '-Wl,-dynamic-linker,/system/bin/linker64', | |
893 ], | |
894 }, { | |
895 'ldflags': [ | |
896 '-Wl,-dynamic-linker,/system/bin/linker', | |
897 ], | |
898 }] | |
899 ], | |
900 'ldflags': [ | |
901 '-Bdynamic', | |
902 '-Wl,-z,nocopyreloc', | |
903 # crtbegin_dynamic.o should be the last item in ldflags. | |
904 '<(android_lib)/crtbegin_dynamic.o', | |
905 ], | |
906 'libraries': [ | |
907 # crtend_android.o needs to be the last item in libraries. | |
908 # Do not add any libraries after this! | |
909 '<(android_lib)/crtend_android.o', | |
910 ], | |
911 }], | |
912 ['_type=="shared_library"', { | |
913 'ldflags': [ | |
914 '-Wl,-shared,-Bsymbolic', | |
915 '<(android_lib)/crtbegin_so.o', | |
916 ], | |
917 }], | |
918 ['_type=="static_library"', { | |
919 'ldflags': [ | |
920 # Don't export symbols from statically linked libraries. | |
921 '-Wl,--exclude-libs=ALL', | |
922 ], | |
923 }], | |
924 ], | |
925 }], # _toolset=="target" | |
926 # Settings for building host targets using the system toolchain. | |
927 ['_toolset=="host"', { | |
928 'cflags': [ '-pthread' ], | |
929 'ldflags': [ '-pthread' ], | |
930 'ldflags!': [ | |
931 '-Wl,-z,noexecstack', | |
932 '-Wl,--gc-sections', | |
933 '-Wl,-O1', | |
934 '-Wl,--as-needed', | |
935 ], | |
936 }], | |
937 ], # target_conditions | |
938 }, # target_defaults | |
939 }], # OS=="android" | |
675 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { | 940 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { |
676 'make_global_settings': [ | 941 'make_global_settings': [ |
677 ['CC.host', '../<(clang_dir)/bin/clang'], | 942 ['CC.host', '../<(clang_dir)/bin/clang'], |
678 ['CXX.host', '../<(clang_dir)/bin/clang++'], | 943 ['CXX.host', '../<(clang_dir)/bin/clang++'], |
679 ], | 944 ], |
680 }], | 945 }], |
681 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { | 946 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"' , { |
682 'target_conditions': [ | 947 'target_conditions': [ |
683 ['_toolset=="host"', { | 948 ['_toolset=="host"', { |
684 'cflags_cc': [ '-std=gnu++11', ], | 949 'cflags_cc': [ '-std=gnu++11', ], |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
727 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 992 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
728 'make_global_settings': [ | 993 'make_global_settings': [ |
729 ['CC_wrapper', '<(gomadir)/gomacc'], | 994 ['CC_wrapper', '<(gomadir)/gomacc'], |
730 ['CXX_wrapper', '<(gomadir)/gomacc'], | 995 ['CXX_wrapper', '<(gomadir)/gomacc'], |
731 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 996 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
732 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 997 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
733 ], | 998 ], |
734 }], | 999 }], |
735 ], | 1000 ], |
736 } | 1001 } |
OLD | NEW |