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 15 matching lines...) Expand all Loading... |
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 # Definitions to be used when building stand-alone V8 binaries. | 28 # Definitions to be used when building stand-alone V8 binaries. |
29 | 29 |
30 { | 30 { |
31 # We need to include toolchain.gypi here for third-party sources that don't | 31 # We need to include toolchain.gypi here for third-party sources that don't |
32 # directly include it themselves. | 32 # directly include it themselves. |
33 'includes': ['toolchain.gypi'], | 33 'includes': ['toolchain.gypi'], |
34 'variables': { | 34 'variables': { |
35 'component%': 'static_library', | 35 'component%': 'static_library', |
36 'clang_dir%': 'third_party/llvm-build/Release+Asserts', | |
37 'clang_xcode%': 0, | 36 'clang_xcode%': 0, |
38 # Track where uninitialized memory originates from. From fastest to | 37 # Track where uninitialized memory originates from. From fastest to |
39 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 | 38 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 |
40 # - track the chain of stores leading from allocation site to use site. | 39 # - track the chain of stores leading from allocation site to use site. |
41 'msan_track_origins%': 2, | 40 'msan_track_origins%': 2, |
42 'visibility%': 'hidden', | 41 'visibility%': 'hidden', |
43 'v8_enable_backtrace%': 0, | 42 'v8_enable_backtrace%': 0, |
44 'v8_enable_i18n_support%': 1, | 43 'v8_enable_i18n_support%': 1, |
45 'v8_deprecation_warnings': 1, | 44 'v8_deprecation_warnings': 1, |
46 # TODO(jochen): Turn this on. | 45 # TODO(jochen): Turn this on. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 'tsan%': 0, | 77 'tsan%': 0, |
79 # Enable coverage gathering instrumentation in sanitizer tools. This flag | 78 # Enable coverage gathering instrumentation in sanitizer tools. This flag |
80 # also controls coverage granularity (1 for function-level, 2 for | 79 # also controls coverage granularity (1 for function-level, 2 for |
81 # block-level, 3 for edge-level). | 80 # block-level, 3 for edge-level). |
82 'sanitizer_coverage%': 0, | 81 'sanitizer_coverage%': 0, |
83 # Use libc++ (buildtools/third_party/libc++ and | 82 # Use libc++ (buildtools/third_party/libc++ and |
84 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard | 83 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard |
85 # library. This is intended to be used for instrumented builds. | 84 # library. This is intended to be used for instrumented builds. |
86 'use_custom_libcxx%': 0, | 85 'use_custom_libcxx%': 0, |
87 | 86 |
| 87 'clang_dir%': 'third_party/llvm-build/Release+Asserts', |
| 88 |
88 # goma settings. | 89 # goma settings. |
89 # 1 to use goma. | 90 # 1 to use goma. |
90 # If no gomadir is set, it uses the default gomadir. | 91 # If no gomadir is set, it uses the default gomadir. |
91 'use_goma%': 0, | 92 'use_goma%': 0, |
92 'gomadir%': '', | 93 'gomadir%': '', |
93 'conditions': [ | 94 'conditions': [ |
94 # Set default gomadir. | 95 # Set default gomadir. |
95 ['OS=="win"', { | 96 ['OS=="win"', { |
96 'gomadir': 'c:\\goma\\goma-win', | 97 'gomadir': 'c:\\goma\\goma-win', |
97 }, { | 98 }, { |
98 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', | 99 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
99 }], | 100 }], |
| 101 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', { |
| 102 'host_clang%': '1', |
| 103 }, { |
| 104 'host_clang%': '0', |
| 105 }], |
100 ], | 106 ], |
101 }, | 107 }, |
| 108 'clang_dir%': '<(clang_dir)', |
102 'host_arch%': '<(host_arch)', | 109 'host_arch%': '<(host_arch)', |
| 110 'host_clang%': '<(host_clang)', |
103 'target_arch%': '<(target_arch)', | 111 'target_arch%': '<(target_arch)', |
104 'v8_target_arch%': '<(v8_target_arch)', | 112 'v8_target_arch%': '<(v8_target_arch)', |
105 'werror%': '-Werror', | 113 'werror%': '-Werror', |
106 'use_goma%': '<(use_goma)', | 114 'use_goma%': '<(use_goma)', |
107 'gomadir%': '<(gomadir)', | 115 'gomadir%': '<(gomadir)', |
108 'asan%': '<(asan)', | 116 'asan%': '<(asan)', |
109 'lsan%': '<(lsan)', | 117 'lsan%': '<(lsan)', |
110 'msan%': '<(msan)', | 118 'msan%': '<(msan)', |
111 'tsan%': '<(tsan)', | 119 'tsan%': '<(tsan)', |
112 'sanitizer_coverage%': '<(sanitizer_coverage)', | 120 'sanitizer_coverage%': '<(sanitizer_coverage)', |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 'v8_enable_gdbjit%': 1, | 181 'v8_enable_gdbjit%': 1, |
174 }, { | 182 }, { |
175 'v8_enable_gdbjit%': 0, | 183 'v8_enable_gdbjit%': 0, |
176 }], | 184 }], |
177 ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64
") and \ | 185 ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64
") and \ |
178 (v8_target_arch!="x87" and v8_target_arch!="x32")', { | 186 (v8_target_arch!="x87" and v8_target_arch!="x32")', { |
179 'clang%': 1, | 187 'clang%': 1, |
180 }, { | 188 }, { |
181 'clang%': 0, | 189 'clang%': 0, |
182 }], | 190 }], |
183 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le"', { | |
184 'host_clang%': '1', | |
185 }, { | |
186 'host_clang%': '0', | |
187 }], | |
188 ['asan==1 or lsan==1 or msan==1 or tsan==1', { | 191 ['asan==1 or lsan==1 or msan==1 or tsan==1', { |
189 'clang%': 1, | 192 'clang%': 1, |
190 'use_allocator%': 'none', | 193 'use_allocator%': 'none', |
191 }], | 194 }], |
192 ['asan==1 and OS=="linux"', { | 195 ['asan==1 and OS=="linux"', { |
193 'use_custom_libcxx%': 1, | 196 'use_custom_libcxx%': 1, |
194 }], | 197 }], |
195 ['tsan==1', { | 198 ['tsan==1', { |
196 'use_custom_libcxx%': 1, | 199 'use_custom_libcxx%': 1, |
197 }], | 200 }], |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 }], | 238 }], |
236 ['target_arch == "mipsel"', { | 239 ['target_arch == "mipsel"', { |
237 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 240 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux
-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
238 }], | 241 }], |
239 ['target_arch == "mips64el"', { | 242 ['target_arch == "mips64el"', { |
240 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-lin
ux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', | 243 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-lin
ux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
241 }], | 244 }], |
242 ], | 245 ], |
243 }, | 246 }, |
244 | 247 |
| 248 # Copy conditionally-set variables out one scope. |
| 249 'android_toolchain%': '<(android_toolchain)', |
| 250 |
245 'conditions': [ | 251 'conditions': [ |
246 ['android_ndk_root==""', { | 252 ['android_ndk_root==""', { |
247 'variables': { | 253 'variables': { |
248 'android_sysroot': '<(android_toolchain)/sysroot/', | 254 'android_sysroot': '<(android_toolchain)/sysroot/', |
249 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/'
, | 255 'android_stlport': '<(android_toolchain)/sources/cxx-stl/stlport/'
, |
250 }, | 256 }, |
251 'android_include': '<(android_sysroot)/usr/include', | 257 'android_include': '<(android_sysroot)/usr/include', |
252 'conditions': [ | 258 'conditions': [ |
253 ['target_arch=="x64"', { | 259 ['target_arch=="x64"', { |
254 'android_lib': '<(android_sysroot)/usr/lib64', | 260 'android_lib': '<(android_sysroot)/usr/lib64', |
(...skipping 15 matching lines...) Expand all Loading... |
270 }, { | 276 }, { |
271 'android_lib': '<(android_sysroot)/usr/lib', | 277 'android_lib': '<(android_sysroot)/usr/lib', |
272 }], | 278 }], |
273 ], | 279 ], |
274 'android_stlport_include': '<(android_stlport)/stlport', | 280 'android_stlport_include': '<(android_stlport)/stlport', |
275 'android_stlport_libs': '<(android_stlport)/libs', | 281 'android_stlport_libs': '<(android_stlport)/libs', |
276 }], | 282 }], |
277 ], | 283 ], |
278 'android_stlport_library': 'stlport_static', | 284 'android_stlport_library': 'stlport_static', |
279 }], # OS=="android" | 285 }], # OS=="android" |
| 286 ['host_clang==1', { |
| 287 'host_cc': '../<(clang_dir)/bin/clang', |
| 288 'host_cxx': '../<(clang_dir)/bin/clang++', |
| 289 }, { |
| 290 'host_cc': '<!(which gcc)', |
| 291 'host_cxx': '<!(which g++)', |
| 292 }], |
280 ], | 293 ], |
281 # Default ARM variable settings. | 294 # Default ARM variable settings. |
282 'arm_version%': 'default', | 295 'arm_version%': 'default', |
283 'arm_fpu%': 'vfpv3', | 296 'arm_fpu%': 'vfpv3', |
284 'arm_float_abi%': 'default', | 297 'arm_float_abi%': 'default', |
285 'arm_thumb': 'default', | 298 'arm_thumb': 'default', |
286 | 299 |
287 # Default MIPS variable settings. | 300 # Default MIPS variable settings. |
288 'mips_arch_variant%': 'r2', | 301 'mips_arch_variant%': 'r2', |
289 # Possible values fp32, fp64, fpxx. | 302 # Possible values fp32, fp64, fpxx. |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 '-lrt', # librt is built into Bionic. | 818 '-lrt', # librt is built into Bionic. |
806 # Not supported by Android toolchain. | 819 # Not supported by Android toolchain. |
807 # Where do these come from? Can't find references in | 820 # Where do these come from? Can't find references in |
808 # any Chromium gyp or gypi file. Maybe they come from | 821 # any Chromium gyp or gypi file. Maybe they come from |
809 # gyp itself? | 822 # gyp itself? |
810 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp
lc4', '-lnspr4', | 823 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lp
lc4', '-lnspr4', |
811 ], | 824 ], |
812 'libraries': [ | 825 'libraries': [ |
813 '-l<(android_stlport_library)', | 826 '-l<(android_stlport_library)', |
814 # Manually link the libgcc.a that the cross compiler uses. | 827 # Manually link the libgcc.a that the cross compiler uses. |
815 '<!($CC -print-libgcc-file-name)', | 828 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
816 '-lc', | 829 '-lc', |
817 '-ldl', | 830 '-ldl', |
818 '-lstdc++', | 831 '-lstdc++', |
819 '-lm', | 832 '-lm', |
820 ], | 833 ], |
821 'conditions': [ | 834 'conditions': [ |
822 ['target_arch == "arm"', { | 835 ['target_arch == "arm"', { |
823 'ldflags': [ | 836 'ldflags': [ |
824 # Enable identical code folding to reduce size. | 837 # Enable identical code folding to reduce size. |
825 '-Wl,--icf=safe', | 838 '-Wl,--icf=safe', |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 'ldflags!': [ | 943 'ldflags!': [ |
931 '-Wl,-z,noexecstack', | 944 '-Wl,-z,noexecstack', |
932 '-Wl,--gc-sections', | 945 '-Wl,--gc-sections', |
933 '-Wl,-O1', | 946 '-Wl,-O1', |
934 '-Wl,--as-needed', | 947 '-Wl,--as-needed', |
935 ], | 948 ], |
936 }], | 949 }], |
937 ], # target_conditions | 950 ], # target_conditions |
938 }, # target_defaults | 951 }, # target_defaults |
939 }], # OS=="android" | 952 }], # OS=="android" |
| 953 ['OS=="android" and clang==0', { |
| 954 # Hardcode the compiler names in the Makefile so that |
| 955 # it won't depend on the environment at make time. |
| 956 'make_global_settings': [ |
| 957 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| 958 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
| 959 ['CC.host', '<(host_cc)'], |
| 960 ['CXX.host', '<(host_cxx)'], |
| 961 ], |
| 962 }], |
940 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"'
, { | 963 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"'
, { |
941 'make_global_settings': [ | 964 'make_global_settings': [ |
942 ['CC.host', '../<(clang_dir)/bin/clang'], | 965 ['CC.host', '../<(clang_dir)/bin/clang'], |
943 ['CXX.host', '../<(clang_dir)/bin/clang++'], | 966 ['CXX.host', '../<(clang_dir)/bin/clang++'], |
944 ], | 967 ], |
945 }], | 968 }], |
946 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"'
, { | 969 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"'
, { |
947 'target_conditions': [ | 970 'target_conditions': [ |
948 ['_toolset=="host"', { | 971 ['_toolset=="host"', { |
949 'cflags_cc': [ '-std=gnu++11', ], | 972 'cflags_cc': [ '-std=gnu++11', ], |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | 1015 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
993 'make_global_settings': [ | 1016 'make_global_settings': [ |
994 ['CC_wrapper', '<(gomadir)/gomacc'], | 1017 ['CC_wrapper', '<(gomadir)/gomacc'], |
995 ['CXX_wrapper', '<(gomadir)/gomacc'], | 1018 ['CXX_wrapper', '<(gomadir)/gomacc'], |
996 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 1019 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
997 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 1020 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
998 ], | 1021 ], |
999 }], | 1022 }], |
1000 ], | 1023 ], |
1001 } | 1024 } |
OLD | NEW |