<commit_before>#!/bin/bash -eu
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Build SwiftShader
pushd third_party/externals/swiftshader/
export SWIFTSHADER_INCLUDE_PATH=$PWD/include
# SwiftShader already has a build/ directory, use something else
rm -rf build_swiftshader
mkdir build_swiftshader

cd build_swiftshader
if [ $SANITIZER == "coverage" ]; then
  cmake ..
else
  if [ $SANITIZER == "address" ]; then
    CMAKE_SANITIZER="SWIFTSHADER_ASAN"
  elif [ $SANITIZER == "memory" ]; then
    CMAKE_SANITIZER="SWIFTSHADER_MSAN"
  elif [ $SANITIZER == "undefined" ]; then
    # The current SwiftShader build needs -fno-sanitize=vptr, but it cannot be
    # specified here since -fsanitize=undefined will always come after any
    # user specified flags passed to cmake. SwiftShader does not need to be
    # built with the undefined sanitizer in order to fuzz Skia, so don't.
    CMAKE_SANITIZER="SWIFTSHADER_UBSAN_DISABLED"
  else
    exit 1<commit_msg>[skia] Fix coverage build to use Ninja. (#4005)<commit_after>#!/bin/bash -eu
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################

# Build SwiftShader
pushd third_party/externals/swiftshader/
export SWIFTSHADER_INCLUDE_PATH=$PWD/include
# SwiftShader already has a build/ directory, use something else
rm -rf build_swiftshader
mkdir build_swiftshader

cd build_swiftshader
if [ $SANITIZER == "coverage" ]; then
  cmake .. -GNinja -DCMAKE_MAKE_PROGRAM="$SRC/depot_tools/ninja"
else
  if [ $SANITIZER == "address" ]; then
    CMAKE_SANITIZER="SWIFTSHADER_ASAN"
  elif [ $SANITIZER == "memory" ]; then
    CMAKE_SANITIZER="SWIFTSHADER_MSAN"
  elif [ $SANITIZER == "undefined" ]; then
    # The current SwiftShader build needs -fno-sanitize=vptr, but it cannot be
    # specified here since -fsanitize=undefined will always come after any
    # user specified flags passed to cmake. SwiftShader does not need to be
    # built with the undefined sanitizer in order to fuzz Skia, so don't.
    CMAKE_SANITIZER="SWIFTSHADER_UBSAN_DISABLED"
  else
    exit 1
{'fraction_non_alphanumeric': 0.12523248605083695, 'fraction_numerical': 0.006819590824550527, 'mean_word_length': 4.535162950257289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4702042', 'n_tokens_mistral': 992, 'n_tokens_neox': 949, 'n_words': 356}