Lines Matching +full:clang +full:- +full:msan
28 # Definitions to be used when building stand-alone V8 binaries.
31 # We need to include toolchain.gypi here for third-party sources that don't
38 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
39 # - track the chain of stores leading from allocation site to use site.
81 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()")',
84 # files. Uses gcov if clang=0 is set explicitly. Otherwise,
96 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_arm-sysroot',
99 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_amd64-sysroot',
102 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_i386-sysroot',
105 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_wheezy_mips-sysroot',
119 'msan%': 0,
122 # also controls coverage granularity (1 for function-level, 2 for
123 # block-level, 3 for edge-level).
136 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts',
137 'make_clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts',
142 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
166 'gomadir': 'c:\\goma\\goma-win',
168 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
177 # are using a custom toolchain and need to control -B in ldflags.
178 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
194 'werror%': '-Werror',
199 'msan%': '<(msan)',
216 'v8_extra_library_files': ['../test/cctest/test-extra.js'],
217 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-extra.js'],
226 # 0 - Compiler optimizations off (debuggable) (default). This may
228 # 1 - Turn on optimizations and disable slow DCHECKs, but leave
233 # or need a debug version of V8. This should produce near-release
247 'inspector_gyp_path': '../src/v8-inspector/inspector.gyp',
291 'clang%': 1,
293 'clang%': 0,
295 ['asan==1 or lsan==1 or msan==1 or tsan==1', {
296 'clang%': 1,
305 ['msan==1', {
306 # Use a just-built, MSan-instrumented libc++ instead of the system-wide
321 'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')",
324 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
325 'os_folder_name%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/darwin/')",
328 # Copy conditionally-set variables out one scope.
336 …'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(os_folder_name)-<(android…
342 …'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(os_folder_name)-<(andr…
348 …id_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(os_folder_nam…
354 …_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(os_folder_name)…
360 …d_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(os_folder_name)…
366 …toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(os_folder_name)…
374 # Copy conditionally-set variables out one scope.
389 'android_stl': '<(android_toolchain)/sources/cxx-stl/',
398 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
399 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
400 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
405 …'android_sysroot': '<(android_ndk_root)/platforms/android-<(android_target_platform)/arch-<(androi…
406 'android_stl': '<(android_ndk_root)/sources/cxx-stl/',
415 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
416 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
417 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
431 'host_cc': '<(clang_dir)/bin/clang',
432 'host_cxx': '<(clang_dir)/bin/clang++',
447 # fp32 - 32 32-bit FPU registers are available, doubles are placed in
449 # fp64 - 32 64-bit FPU registers are available.
450 # fpxx - compatibility mode, it chooses fp32 or fp64 depending on runtime
458 '-Wsign-compare',
460 '-Wno-undefined-var-template',
462 '-Wno-nonportable-include-path',
476 'cflags': [ '-g', '-Og', '-gxcoff' ],
478 'cflags': [ '-g', '-O0' ],
506 ['clang==0', {
508 '-Wno-uninitialized',
511 ['clang==1 or host_clang==1', {
512 # This is here so that all files get recompiled after a clang roll and
513 # when turning clang on or off.
517 …'defines': ['CR_CLANG_REVISION=<!(python <(DEPTH)/tools/clang/scripts/update.py --print-revision)'…
519 ['clang==1 and target_arch=="ia32"', {
520 'cflags': ['-mstack-alignment=16', '-mstackrealign'],
547 # We don't want to get warnings from third-party code,
548 # so remove any existing warning-enabling flags like -Wall.
550 '-pedantic',
551 '-Wall',
552 '-Werror',
553 '-Wextra',
554 '-Wshorten-64-to-32',
557 # Clang considers the `register` keyword as deprecated, but
559 '-Wno-deprecated-register',
561 '-Wno-deprecated-declarations',
563 '-Wno-logical-op-parentheses',
565 '-Wno-tautological-compare',
571 '-Wno-switch',
574 '-Wnon-virtual-dtor',
579 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
599 ['asan==1 or lsan==1 or tsan==1 or msan==1 or cfi_vptr==1', {
603 '-fno-omit-frame-pointer',
604 '-gline-tables-only',
607 '-fomit-frame-pointer',
616 '-fsanitize=address',
619 '-fsanitize=address',
631 '-fsanitize=leak',
634 '-fsanitize=leak',
646 '-fsanitize=thread',
649 '-fsanitize=thread',
657 ['msan==1', {
661 '-fsanitize=memory',
662 '-fsanitize-memory-track-origins=<(msan_track_origins)',
663 '-fPIC',
666 '-fsanitize=memory',
667 '-pie',
689 '-fsanitize-coverage=<(sanitizer_coverage)',
697 ['linux_use_bundled_gold==1 and not (clang==0 and use_lto==1)', {
700 # cwd is when running the compiler, so the normal gyp path-munging
703 # Disabled when using GCC LTO because GCC also uses the -B search
709 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin',
712 ['sysroot!="" and clang==1', {
716 '--sysroot=<(sysroot)',
719 '--sysroot=<(sysroot)',
734 '-fno-omit-frame-pointer',
735 '-gline-tables-only',
736 '-fsanitize=address',
737 '-w', # http://crbug.com/162783
740 '-fomit-frame-pointer',
751 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']},
759 '-fsanitize-coverage=<(sanitizer_coverage)',
774 '-Wall',
776 '-Wno-unused-parameter',
777 '-pthread',
778 '-pedantic',
779 '-Wmissing-field-initializers',
780 '-Wno-gnu-zero-variadic-macro-arguments',
783 '-Wnon-virtual-dtor',
784 '-fno-exceptions',
785 '-fno-rtti',
786 '-std=gnu++11',
788 'ldflags': [ '-pthread', ],
793 [ 'clang==0', {
795 '-pedantic' ,
797 '-Wno-gnu-zero-variadic-macro-arguments',
800 [ 'clang==1 and (v8_target_arch=="x64" or v8_target_arch=="arm64" \
802 'cflags': [ '-Wshorten-64-to-32' ],
805 'cflags': [ '-mminimal-toc' ],
808 'cflags': [ '-fvisibility=hidden' ],
811 'cflags': [ '-fPIC', ],
813 [ 'clang==0 and coverage==1', {
814 'cflags': [ '-fprofile-arcs', '-ftest-coverage'],
815 'ldflags': [ '-fprofile-arcs'],
825 '-Wall',
827 '-Wno-unused-parameter',
829 '-Wno-missing-field-initializers',
830 '-Wno-gnu-zero-variadic-macro-arguments',
833 '-Wnon-virtual-dtor',
834 '-fno-exceptions',
835 '-fno-rtti',
836 '-std=gnu++11',
840 'cflags': [ '-fvisibility=hidden' ],
843 'cflags': [ '-fPIC' ],
848 'cflags': [ '-pthread' ],
849 'ldflags': [ '-pthread' ],
850 'libraries': [ '-lrt' ],
853 'cflags': [ '-Wno-psabi' ],
854 'libraries': [ '-lbacktrace', '-lsocket', '-lm' ],
884 # compile-time constant expression (due to constant template args,
901 # on the passed-in pointer (until later), and annotating every legit
916 # copy-constructors in some cases.
920 # non-portable
948 # should work through these at some point -- they may be removed from
1018 ['clang==1', {
1023 '-Wno-unused-parameter',
1026 '-Wno-missing-field-initializers',
1029 '-Qunused-arguments', # http://crbug.com/504658
1030 '-Wno-microsoft-enum-value', # http://crbug.com/505296
1031 '-Wno-unknown-pragmas', # http://crbug.com/505314
1032 '-Wno-microsoft-cast', # http://crbug.com/550065
1036 ['clang==1 and MSVS_VERSION == "2013"', {
1039 '-fmsc-version=1800',
1043 ['clang==1 and MSVS_VERSION == "2015"', {
1046 '-fmsc-version=1900',
1062 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1063 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1064 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1065 # (Equivalent to -fPIC)
1066 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1067 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1068 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
1069 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1071 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1072 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1073 'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor
1074 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1076 'PREBINDING': 'NO', # No -Wl,-prebind
1080 '-fno-strict-aliasing',
1083 '-Wall',
1084 '-Wendif-labels',
1085 '-Wno-unused-parameter',
1087 '-Wno-missing-field-initializers',
1088 '-Wno-gnu-zero-variadic-macro-arguments',
1097 ['clang==1', {
1099 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
1100 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
1105 'CC': '<(clang_dir)/bin/clang',
1106 'LDPLUSPLUS': '<(clang_dir)/bin/clang++',
1112 'xcode_settings': {'WARNING_CFLAGS': ['-Wshorten-64-to-32']},
1119 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1132 '-fomit-frame-pointer',
1136 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter'],
1137 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions',
1138 '-std=gnu++11' ],
1142 '-pthread', # Not supported by Android toolchain.
1145 '-ffunction-sections',
1146 '-funwind-tables',
1147 '-fstack-protector',
1148 '-fno-short-enums',
1149 '-finline-limit=64',
1150 '-Wa,--noexecstack',
1151 '--sysroot=<(android_sysroot)',
1154 '-isystem<(android_libcpp_include)',
1155 '-isystem<(android_libcpp_abi_include)',
1156 '-isystem<(android_support_include)',
1167 '-pthread', # Not supported by Android toolchain.
1170 '-Wl,--no-undefined',
1171 '--sysroot=<(android_sysroot)',
1172 '-nostdlib',
1175 '-lrt', # librt is built into Bionic.
1180 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
1183 '-l<(android_libcpp_library)',
1184 '-latomic',
1186 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
1187 '-lc',
1188 '-ldl',
1189 '-lm',
1195 '-Wl,--icf=safe',
1200 '-march=armv7-a',
1201 '-mtune=cortex-a8',
1202 '-mfpu=vfp3',
1205 '-L<(android_libcpp_libs)/armeabi-v7a',
1210 '-L<(android_libcpp_libs)/armeabi',
1215 '-L<(android_libcpp_libs)/x86_64',
1220 '-L<(android_libcpp_libs)/arm64-v8a',
1224 # The x86 toolchain currently has problems with stack-protector.
1226 '-fstack-protector',
1229 '-fno-stack-protector',
1232 '-L<(android_libcpp_libs)/x86',
1236 # The mips toolchain currently has problems with stack-protector.
1238 '-fstack-protector',
1239 '-U__linux__'
1242 '-fno-stack-protector',
1245 '-L<(android_libcpp_libs)/mips',
1250 '-fPIE',
1253 '-pie',
1262 '-Wl,-dynamic-linker,/system/bin/linker64',
1266 '-Wl,-dynamic-linker,/system/bin/linker',
1271 '-Bdynamic',
1272 '-Wl,-z,nocopyreloc',
1284 '-Wl,-shared,-Bsymbolic',
1291 '-Wl,--exclude-libs=ALL',
1298 'cflags': [ '-pthread' ],
1299 'ldflags': [ '-pthread' ],
1301 '-Wl,-z,noexecstack',
1302 '-Wl,--gc-sections',
1303 '-Wl,-O1',
1304 '-Wl,--as-needed',
1310 ['OS=="android" and clang==0', {
1314 ['LD', '<!(/bin/echo -n <(android_toolchain)/../*/bin/ld)'],
1315 ['RANLIB', '<!(/bin/echo -n <(android_toolchain)/../*/bin/ranlib)'],
1316 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
1317 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
1324 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"', {
1326 ['CC.host', '<(clang_dir)/bin/clang'],
1327 ['CXX.host', '<(clang_dir)/bin/clang++'],
1330 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"', {
1333 'cflags_cc': [ '-std=gnu++11', ],
1338 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
1342 ['clang==1 and "<(GENERATOR)"=="ninja"', {
1345 'cflags': [ '-fcolor-diagnostics' ],
1346 'xcode_settings': { 'OTHER_CFLAGS': [ '-fcolor-diagnostics' ] },
1349 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1352 ['CC', '<(clang_dir)/bin/clang'],
1353 ['CXX', '<(clang_dir)/bin/clang++'],
1358 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1361 ['CC', '<(clang_dir)/bin/clang'],
1362 ['CXX', '<(clang_dir)/bin/clang++'],
1367 ['clang==1 and OS=="win"', {
1370 ['CC', '<(clang_dir)/bin/clang-cl'],
1373 …['OS=="linux" and target_arch=="arm" and host_arch!="arm" and clang==0 and "<(GENERATOR)"=="ninja"…
1377 ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
1378 ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
1386 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
1424 '-flto',
1430 ['use_lto==1 and clang==0', {
1435 '-ffat-lto-objects',
1441 ['use_lto==1 and clang==1', {
1446 '--plugin', '<(clang_dir)/lib/LLVMgold.so',
1449 # for non-official builds only - a differentiation that doesn't
1452 '-Wl,--plugin-opt,O1',
1458 ['use_lto==1 and clang==0', {
1463 '-flto=32',
1469 ['use_lto==1 and clang==1', {
1474 '-flto',
1485 '-fno-sanitize-trap=cfi',
1486 '-fno-sanitize-recover=cfi',
1489 '-fno-rtti',
1492 '-fno-rtti',
1495 '-fno-sanitize-trap=cfi',
1496 '-fno-sanitize-recover=cfi',
1507 '-fsanitize=cfi-vcall',
1508 '-fsanitize=cfi-derived-cast',
1509 '-fsanitize=cfi-unrelated-cast',
1510 '-fsanitize-blacklist=<(cfi_blacklist)',
1513 '-fsanitize=cfi-vcall',
1514 '-fsanitize=cfi-derived-cast',
1515 '-fsanitize=cfi-unrelated-cast',