| 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 30 matching lines...) Expand all Loading... |
| 41 'visibility%': 'hidden', | 41 'visibility%': 'hidden', |
| 42 'v8_enable_backtrace%': 0, | 42 'v8_enable_backtrace%': 0, |
| 43 'v8_enable_i18n_support%': 1, | 43 'v8_enable_i18n_support%': 1, |
| 44 'v8_deprecation_warnings': 1, | 44 'v8_deprecation_warnings': 1, |
| 45 'v8_imminent_deprecation_warnings': 1, | 45 'v8_imminent_deprecation_warnings': 1, |
| 46 'msvs_multi_core_compile%': '1', | 46 'msvs_multi_core_compile%': '1', |
| 47 'mac_deployment_target%': '10.5', | 47 'mac_deployment_target%': '10.5', |
| 48 'release_extra_cflags%': '', | 48 'release_extra_cflags%': '', |
| 49 'variables': { | 49 'variables': { |
| 50 'variables': { | 50 'variables': { |
| 51 # goma settings. | |
| 52 # 1 to use goma. | |
| 53 # If no gomadir is set, it uses the default gomadir. | |
| 54 'use_goma%': 0, | |
| 55 'gomadir%': '', | |
| 56 | |
| 57 'variables': { | 51 'variables': { |
| 58 'conditions': [ | 52 'conditions': [ |
| 59 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \ | 53 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \ |
| 60 OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', { | 54 OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', { |
| 61 # This handles the Unix platforms we generally deal with. | 55 # This handles the Unix platforms we generally deal with. |
| 62 # Anything else gets passed through, which probably won't work | 56 # Anything else gets passed through, which probably won't work |
| 63 # very well; such hosts should pass an explicit target_arch | 57 # very well; such hosts should pass an explicit target_arch |
| 64 # to gyp. | 58 # to gyp. |
| 65 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', | 59 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)', |
| 66 }, { | 60 }, { |
| 67 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and | 61 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and |
| 68 # OS!="netbsd" and OS!="mac" and OS!="aix" | 62 # OS!="netbsd" and OS!="mac" and OS!="aix" |
| 69 'host_arch%': 'ia32', | 63 'host_arch%': 'ia32', |
| 70 }], | 64 }], |
| 71 ], | 65 ], |
| 72 }, | 66 }, |
| 73 'host_arch%': '<(host_arch)', | 67 'host_arch%': '<(host_arch)', |
| 74 'target_arch%': '<(host_arch)', | 68 'target_arch%': '<(host_arch)', |
| 75 'v8_target_arch%': '<(host_arch)', | |
| 76 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()"
)', | 69 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()"
)', |
| 77 | 70 |
| 78 # Instrument for code coverage with gcov. | 71 # Instrument for code coverage with gcov. |
| 79 'coverage%': 0, | 72 'coverage%': 0, |
| 80 | |
| 81 'conditions': [ | |
| 82 # Set default gomadir. | |
| 83 ['OS=="win"', { | |
| 84 'gomadir': 'c:\\goma\\goma-win', | |
| 85 }, { | |
| 86 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', | |
| 87 }], | |
| 88 ], | |
| 89 }, | 73 }, |
| 90 'base_dir%': '<(base_dir)', | 74 'base_dir%': '<(base_dir)', |
| 91 'host_arch%': '<(host_arch)', | 75 'host_arch%': '<(host_arch)', |
| 92 'target_arch%': '<(target_arch)', | 76 'target_arch%': '<(target_arch)', |
| 93 'v8_target_arch%': '<(v8_target_arch)', | 77 'v8_target_arch%': '<(target_arch)', |
| 94 'coverage%': '<(coverage)', | 78 'coverage%': '<(coverage)', |
| 95 'use_goma%': '<(use_goma)', | |
| 96 'gomadir%': '<(gomadir)', | |
| 97 'asan%': 0, | 79 'asan%': 0, |
| 98 'lsan%': 0, | 80 'lsan%': 0, |
| 99 'msan%': 0, | 81 'msan%': 0, |
| 100 'tsan%': 0, | 82 'tsan%': 0, |
| 101 # Enable coverage gathering instrumentation in sanitizer tools. This flag | 83 # Enable coverage gathering instrumentation in sanitizer tools. This flag |
| 102 # also controls coverage granularity (1 for function-level, 2 for | 84 # also controls coverage granularity (1 for function-level, 2 for |
| 103 # block-level, 3 for edge-level). | 85 # block-level, 3 for edge-level). |
| 104 'sanitizer_coverage%': 0, | 86 'sanitizer_coverage%': 0, |
| 105 # Use libc++ (buildtools/third_party/libc++ and | 87 # Use libc++ (buildtools/third_party/libc++ and |
| 106 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard | 88 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard |
| 107 # library. This is intended to be used for instrumented builds. | 89 # library. This is intended to be used for instrumented builds. |
| 108 'use_custom_libcxx%': 0, | 90 'use_custom_libcxx%': 0, |
| 109 | 91 |
| 110 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts', | 92 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts', |
| 111 | 93 |
| 112 'use_lto%': 0, | 94 'use_lto%': 0, |
| 113 | 95 |
| 114 # Control Flow Integrity for virtual calls and casts. | 96 # Control Flow Integrity for virtual calls and casts. |
| 115 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html | 97 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html |
| 116 'cfi_vptr%': 0, | 98 'cfi_vptr%': 0, |
| 117 'cfi_diag%': 0, | 99 'cfi_diag%': 0, |
| 118 | 100 |
| 119 'cfi_blacklist%': '<(base_dir)/tools/cfi/blacklist.txt', | 101 'cfi_blacklist%': '<(base_dir)/tools/cfi/blacklist.txt', |
| 120 | 102 |
| 121 # Set to 1 to enable fast builds. | 103 # Set to 1 to enable fast builds. |
| 122 # TODO(machenbach): Only configured for windows. | 104 # TODO(machenbach): Only configured for windows. |
| 123 'fastbuild%': 0, | 105 'fastbuild%': 0, |
| 124 | 106 |
| 107 # goma settings. |
| 108 # 1 to use goma. |
| 109 # If no gomadir is set, it uses the default gomadir. |
| 110 'use_goma%': 0, |
| 111 'gomadir%': '', |
| 112 |
| 125 # Check if valgrind directories are present. | 113 # Check if valgrind directories are present. |
| 126 'has_valgrind%': '<!pymod_do_main(has_valgrind)', | 114 'has_valgrind%': '<!pymod_do_main(has_valgrind)', |
| 127 | 115 |
| 128 'conditions': [ | 116 'conditions': [ |
| 117 # Set default gomadir. |
| 118 ['OS=="win"', { |
| 119 'gomadir': 'c:\\goma\\goma-win', |
| 120 }, { |
| 121 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 122 }], |
| 129 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and h
ost_arch!="s390" and host_arch!="s390x" and \ | 123 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and h
ost_arch!="s390" and host_arch!="s390x" and \ |
| 130 coverage==0', { | 124 coverage==0', { |
| 131 'host_clang%': 1, | 125 'host_clang%': 1, |
| 132 }, { | 126 }, { |
| 133 'host_clang%': 0, | 127 'host_clang%': 0, |
| 134 }], | 128 }], |
| 135 # linux_use_bundled_gold: whether to use the gold linker binary checked | 129 # linux_use_bundled_gold: whether to use the gold linker binary checked |
| 136 # into third_party/binutils. Force this off via GYP_DEFINES when you | 130 # into third_party/binutils. Force this off via GYP_DEFINES when you |
| 137 # are using a custom toolchain and need to control -B in ldflags. | 131 # are using a custom toolchain and need to control -B in ldflags. |
| 138 # Do not use 32-bit gold on 32-bit hosts as it runs out address space | 132 # Do not use 32-bit gold on 32-bit hosts as it runs out address space |
| 139 # for component=static_library builds. | 133 # for component=static_library builds. |
| 140 ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=
="arm" or (target_arch=="ia32" and host_arch=="x64"))', { | 134 ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=
="arm" or (target_arch=="ia32" and host_arch=="x64"))', { |
| 141 'linux_use_bundled_gold%': 1, | 135 'linux_use_bundled_gold%': 1, |
| 142 }, { | 136 }, { |
| 143 'linux_use_bundled_gold%': 0, | 137 'linux_use_bundled_gold%': 0, |
| 144 }], | 138 }], |
| 145 | 139 |
| 146 # TODO(machenbach): Remove the conditions as more configurations are | 140 # TODO(machenbach): Remove the conditions as more configurations are |
| 147 # supported. | 141 # supported. |
| 148 ['OS=="linux" or OS=="win"', { | 142 ['OS=="linux" or OS=="win"', { |
| 149 'test_isolation_mode%': 'check', | 143 'test_isolation_mode%': 'check', |
| 150 }, { | 144 }, { |
| 151 'test_isolation_mode%': 'noop', | 145 'test_isolation_mode%': 'noop', |
| 152 }], | 146 }], |
| 153 | |
| 154 ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x
64") and \ | |
| 155 (v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0', { | |
| 156 'clang%': 1, | |
| 157 }, { | |
| 158 'clang%': 0, | |
| 159 }], | |
| 160 ], | 147 ], |
| 161 }, | 148 }, |
| 162 'base_dir%': '<(base_dir)', | 149 'base_dir%': '<(base_dir)', |
| 163 'clang_dir%': '<(clang_dir)', | 150 'clang_dir%': '<(clang_dir)', |
| 164 'host_arch%': '<(host_arch)', | 151 'host_arch%': '<(host_arch)', |
| 165 'host_clang%': '<(host_clang)', | 152 'host_clang%': '<(host_clang)', |
| 166 'target_arch%': '<(target_arch)', | 153 'target_arch%': '<(target_arch)', |
| 167 'v8_target_arch%': '<(v8_target_arch)', | 154 'v8_target_arch%': '<(v8_target_arch)', |
| 168 'werror%': '-Werror', | 155 'werror%': '-Werror', |
| 169 'use_goma%': '<(use_goma)', | 156 'use_goma%': '<(use_goma)', |
| 170 'gomadir%': '<(gomadir)', | 157 'gomadir%': '<(gomadir)', |
| 171 'clang%': '<(clang)', | |
| 172 'asan%': '<(asan)', | 158 'asan%': '<(asan)', |
| 173 'lsan%': '<(lsan)', | 159 'lsan%': '<(lsan)', |
| 174 'msan%': '<(msan)', | 160 'msan%': '<(msan)', |
| 175 'tsan%': '<(tsan)', | 161 'tsan%': '<(tsan)', |
| 176 'sanitizer_coverage%': '<(sanitizer_coverage)', | 162 'sanitizer_coverage%': '<(sanitizer_coverage)', |
| 177 'use_custom_libcxx%': '<(use_custom_libcxx)', | 163 'use_custom_libcxx%': '<(use_custom_libcxx)', |
| 178 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', | 164 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', |
| 179 'use_lto%': '<(use_lto)', | 165 'use_lto%': '<(use_lto)', |
| 180 'cfi_vptr%': '<(cfi_vptr)', | 166 'cfi_vptr%': '<(cfi_vptr)', |
| 181 'cfi_diag%': '<(cfi_diag)', | 167 'cfi_diag%': '<(cfi_diag)', |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 'chromium_win_pch': 0, | 226 'chromium_win_pch': 0, |
| 241 # goma doesn't support PDB yet. | 227 # goma doesn't support PDB yet. |
| 242 'fastbuild%': 1, | 228 'fastbuild%': 1, |
| 243 }], | 229 }], |
| 244 ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x8
7") and \ | 230 ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x8
7") and \ |
| 245 (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")
', { | 231 (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")
', { |
| 246 'v8_enable_gdbjit%': 1, | 232 'v8_enable_gdbjit%': 1, |
| 247 }, { | 233 }, { |
| 248 'v8_enable_gdbjit%': 0, | 234 'v8_enable_gdbjit%': 0, |
| 249 }], | 235 }], |
| 236 ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64
") and \ |
| 237 (v8_target_arch!="x87" and v8_target_arch!="x32") and coverage==0', { |
| 238 'clang%': 1, |
| 239 }, { |
| 240 'clang%': 0, |
| 241 }], |
| 250 ['asan==1 or lsan==1 or msan==1 or tsan==1', { | 242 ['asan==1 or lsan==1 or msan==1 or tsan==1', { |
| 251 'clang%': 1, | 243 'clang%': 1, |
| 252 'use_allocator%': 'none', | 244 'use_allocator%': 'none', |
| 253 }], | 245 }], |
| 254 ['asan==1 and OS=="linux"', { | 246 ['asan==1 and OS=="linux"', { |
| 255 'use_custom_libcxx%': 1, | 247 'use_custom_libcxx%': 1, |
| 256 }], | 248 }], |
| 257 ['tsan==1', { | 249 ['tsan==1', { |
| 258 'use_custom_libcxx%': 1, | 250 'use_custom_libcxx%': 1, |
| 259 }], | 251 }], |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 ], | 355 ], |
| 364 'android_libcpp_library': 'c++_static', | 356 'android_libcpp_library': 'c++_static', |
| 365 }], # OS=="android" | 357 }], # OS=="android" |
| 366 ['host_clang==1', { | 358 ['host_clang==1', { |
| 367 'host_cc': '<(clang_dir)/bin/clang', | 359 'host_cc': '<(clang_dir)/bin/clang', |
| 368 'host_cxx': '<(clang_dir)/bin/clang++', | 360 'host_cxx': '<(clang_dir)/bin/clang++', |
| 369 }, { | 361 }, { |
| 370 'host_cc': '<!(which gcc)', | 362 'host_cc': '<!(which gcc)', |
| 371 'host_cxx': '<!(which g++)', | 363 'host_cxx': '<!(which g++)', |
| 372 }], | 364 }], |
| 373 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | |
| 374 'conditions': [ | |
| 375 ['coverage==1', { | |
| 376 'cc_wrapper': '<(base_dir)/build/coverage_wrapper.py <(gomadir)/goma
cc', | |
| 377 }, { | |
| 378 'cc_wrapper': '<(gomadir)/gomacc', | |
| 379 }], | |
| 380 ], | |
| 381 }, { | |
| 382 'conditions': [ | |
| 383 ['coverage==1', { | |
| 384 'cc_wrapper': '<(base_dir)/build/coverage_wrapper.py', | |
| 385 }, { | |
| 386 'cc_wrapper': 0, | |
| 387 }], | |
| 388 ], | |
| 389 }], | |
| 390 ], | 365 ], |
| 391 # Default ARM variable settings. | 366 # Default ARM variable settings. |
| 392 'arm_version%': 'default', | 367 'arm_version%': 'default', |
| 393 'arm_fpu%': 'vfpv3', | 368 'arm_fpu%': 'vfpv3', |
| 394 'arm_float_abi%': 'default', | 369 'arm_float_abi%': 'default', |
| 395 'arm_thumb': 'default', | 370 'arm_thumb': 'default', |
| 396 | 371 |
| 397 # Default MIPS variable settings. | 372 # Default MIPS variable settings. |
| 398 'mips_arch_variant%': 'r2', | 373 'mips_arch_variant%': 'r2', |
| 399 # Possible values fp32, fp64, fpxx. | 374 # Possible values fp32, fp64, fpxx. |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1279 'make_global_settings': [ | 1254 'make_global_settings': [ |
| 1280 ['CC', '<!(which arm-linux-gnueabihf-gcc)'], | 1255 ['CC', '<!(which arm-linux-gnueabihf-gcc)'], |
| 1281 ['CXX', '<!(which arm-linux-gnueabihf-g++)'], | 1256 ['CXX', '<!(which arm-linux-gnueabihf-g++)'], |
| 1282 ['CC.host', '<(host_cc)'], | 1257 ['CC.host', '<(host_cc)'], |
| 1283 ['CXX.host', '<(host_cxx)'], | 1258 ['CXX.host', '<(host_cxx)'], |
| 1284 ], | 1259 ], |
| 1285 }], | 1260 }], |
| 1286 # TODO(yyanagisawa): supports GENERATOR==make | 1261 # TODO(yyanagisawa): supports GENERATOR==make |
| 1287 # make generator doesn't support CC_wrapper without CC | 1262 # make generator doesn't support CC_wrapper without CC |
| 1288 # in make_global_settings yet. | 1263 # in make_global_settings yet. |
| 1289 ['cc_wrapper!=0', { | 1264 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
| 1290 'make_global_settings': [ | 1265 'make_global_settings': [ |
| 1291 ['CC_wrapper', '<(cc_wrapper)'], | 1266 ['CC_wrapper', '<(gomadir)/gomacc'], |
| 1292 ['CXX_wrapper', '<(cc_wrapper)'], | 1267 ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 1293 ['CC.host_wrapper', '<(cc_wrapper)'], | 1268 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 1294 ['CXX.host_wrapper', '<(cc_wrapper)'], | 1269 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 1295 ], | 1270 ], |
| 1296 }], | 1271 }], |
| 1297 ['use_lto==1', { | 1272 ['use_lto==1', { |
| 1298 'target_defaults': { | 1273 'target_defaults': { |
| 1299 'target_conditions': [ | 1274 'target_conditions': [ |
| 1300 ['_toolset=="target"', { | 1275 ['_toolset=="target"', { |
| 1301 'cflags': [ | 1276 'cflags': [ |
| 1302 '-flto', | 1277 '-flto', |
| 1303 ], | 1278 ], |
| 1304 }], | 1279 }], |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 '-fsanitize=cfi-vcall', | 1366 '-fsanitize=cfi-vcall', |
| 1392 '-fsanitize=cfi-derived-cast', | 1367 '-fsanitize=cfi-derived-cast', |
| 1393 '-fsanitize=cfi-unrelated-cast', | 1368 '-fsanitize=cfi-unrelated-cast', |
| 1394 ], | 1369 ], |
| 1395 }], | 1370 }], |
| 1396 ], | 1371 ], |
| 1397 }, | 1372 }, |
| 1398 }], | 1373 }], |
| 1399 ], | 1374 ], |
| 1400 } | 1375 } |
| OLD | NEW |