source-test-clang-setup.sh (921B)
1 #!/bin/bash 2 source $HOME/checkouts/gecko/taskcluster/scripts/misc/source-test-common.sh 3 4 # Add clang-tidy to PATH 5 export PATH=$MOZ_FETCHES_DIR/clang-tidy/bin:$PATH 6 7 # Use toolchain clang 8 export LD_LIBRARY_PATH=$MOZ_FETCHES_DIR/clang/lib 9 10 # Write custom mozconfig 11 export MOZCONFIG=$GECKO_PATH/mozconfig 12 13 # Add to mozconfig all the appropriate options 14 cat <<EOT >> $MOZCONFIG 15 # Enable debug mode 16 ac_add_options --enable-debug 17 # Enable clang-plugin in order to have all defines activated for static-analysis 18 ac_add_options --enable-clang-plugin 19 # Enable GC zeal, a testing and debugging feature that helps find GC-related bugs in JSAPI applications. 20 ac_add_options --enable-gczeal 21 # Do not treat warnings as errors 22 ac_add_options --disable-warnings-as-errors 23 EOT 24 25 # Mach lookup clang-tidy in clang-tools 26 mkdir -p $MOZBUILD_STATE_PATH/clang-tools 27 ln -s $MOZ_FETCHES_DIR/clang-tidy $MOZBUILD_STATE_PATH/clang-tools/clang-tidy