<commit_before>#!/usr/bin/env bash
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -ex

source shared.sh

LLVM=6.0.0

mkdir clang
cd clang

curl https://releases.llvm.org/$LLVM/llvm-$LLVM.src.tar.xz | \
  xz -d | \
  tar xf -

cd llvm-$LLVM.src

mkdir -p tools/clang

curl https://releases.llvm.org/$LLVM/cfe-$LLVM.src.tar.xz | \
  xz -d | \
  tar xf - -C tools/clang --strip-components=1

mkdir ../clang-build
cd ../clang-build

# For whatever reason the default set of include paths for clang is different
# than that of gcc. As a result we need to manually include our sysroot's
# include path, /rustroot/include, to clang's default include path.<commit_msg>Build LLD in addition to Clang in Linux CI<commit_after>#!/usr/bin/env bash
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -ex

source shared.sh

LLVM=6.0.0

mkdir clang
cd clang

curl https://releases.llvm.org/$LLVM/llvm-$LLVM.src.tar.xz | \
  xz -d | \
  tar xf -

cd llvm-$LLVM.src

mkdir -p tools/clang

curl https://releases.llvm.org/$LLVM/cfe-$LLVM.src.tar.xz | \
  xz -d | \
  tar xf - -C tools/clang --strip-components=1

mkdir -p tools/lld

curl https://releases.llvm.org/$LLVM/lld-$LLVM.src.tar.xz | \
  xz -d | \
  tar xf - -C tools/lld --strip-components=1

mkdir ../clang-build
cd ../clang-build

# For whatever reason the default set of include paths for clang is different
# than that of gcc. As a result we need to manually include our sysroot's
# include path, /rustroot/include, to clang's default include path.
{'fraction_non_alphanumeric': 0.12117291936179388, 'fraction_numerical': 0.01078050884001725, 'mean_word_length': 3.27255985267035, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5555341', 'n_tokens_mistral': 832, 'n_tokens_neox': 774, 'n_words': 267}