mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
include compiler-rt in build-llvm.pl
Reviewed at http://reviews.llvm.org/D5736 The new test cases for ASan fail if the llvm build that is used with LLDB doesn't have compiler-rt (because the resulting compiler then cannot build with -fsanitize=address). Let's include compiler-rt in build-llvm.pl script and make sure we actually *build* it by removing the NO_RUNTIME_LIBS=1 argument used in the make line. After this, the ASan tests pass on a fresh svn checkout. llvm-svn: 219555
This commit is contained in:
@@ -25,6 +25,7 @@ our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
|
||||
|
||||
our $llvm_revision = "HEAD";
|
||||
our $clang_revision = "HEAD";
|
||||
our $compiler_rt_revision = "HEAD";
|
||||
|
||||
our $SRCROOT = "$ENV{SRCROOT}";
|
||||
our @archs = split (/\s+/, $ENV{ARCHS});
|
||||
@@ -53,7 +54,8 @@ else
|
||||
}
|
||||
our @llvm_repositories = (
|
||||
"$llvm_srcroot",
|
||||
"$llvm_srcroot/tools/clang"
|
||||
"$llvm_srcroot/tools/clang",
|
||||
"$llvm_srcroot/projects/compiler-rt"
|
||||
);
|
||||
|
||||
|
||||
@@ -68,6 +70,8 @@ else
|
||||
do_command ("cd '$SRCROOT' && svn co --quiet --revision $llvm_revision http://llvm.org/svn/llvm-project/llvm/trunk llvm", "checking out llvm from repository", 1);
|
||||
print "Checking out clang sources from revision $clang_revision...\n";
|
||||
do_command ("cd '$llvm_srcroot/tools' && svn co --quiet --revision $clang_revision http://llvm.org/svn/llvm-project/cfe/trunk clang", "checking out clang from repository", 1);
|
||||
print "Checking out compiler-rt sources from revision $compiler_rt_revision...\n";
|
||||
do_command ("cd '$llvm_srcroot/projects' && svn co --quiet --revision $compiler_rt_revision http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt", "checking out compiler-rt from repository", 1);
|
||||
print "Applying any local patches to LLVM/Clang...";
|
||||
|
||||
my @llvm_patches = bsd_glob("$ENV{SRCROOT}/scripts/llvm.*.diff");
|
||||
@@ -81,6 +85,12 @@ else
|
||||
{
|
||||
do_command ("cd '$llvm_srcroot/tools/clang' && patch -p0 < $patch");
|
||||
}
|
||||
|
||||
my @compiler_rt_patches = bsd_glob("$ENV{SRCROOT}/scripts/compiler-rt.*.diff");
|
||||
foreach my $patch (@compiler_rt_patches)
|
||||
{
|
||||
do_command ("cd '$llvm_srcroot/projects/compiler-rt' && patch -p0 < $patch");
|
||||
}
|
||||
}
|
||||
|
||||
# If our output file already exists then we need not generate it again.
|
||||
@@ -307,8 +317,8 @@ sub build_llvm
|
||||
{
|
||||
$extra_make_flags = "UNIVERSAL=1 UNIVERSAL_ARCH=${arch} UNIVERSAL_SDK_PATH='$ENV{SDKROOT}' SDKROOT=";
|
||||
}
|
||||
do_command ("cd '$llvm_dstroot_arch' && make -j$num_cpus clang-only VERBOSE=1 $llvm_config_href->{make_options} NO_RUNTIME_LIBS=1 PROJECT_NAME='llvm' $extra_make_flags", "making llvm and clang", 1);
|
||||
do_command ("cd '$llvm_dstroot_arch' && make -j$num_cpus tools-only VERBOSE=1 $llvm_config_href->{make_options} NO_RUNTIME_LIBS=1 PROJECT_NAME='llvm' $extra_make_flags EDIS_VERSION=1", "making libedis", 1);
|
||||
do_command ("cd '$llvm_dstroot_arch' && make -j$num_cpus clang-only VERBOSE=1 $llvm_config_href->{make_options} PROJECT_NAME='llvm' $extra_make_flags", "making llvm and clang", 1);
|
||||
do_command ("cd '$llvm_dstroot_arch' && make -j$num_cpus tools-only VERBOSE=1 $llvm_config_href->{make_options} PROJECT_NAME='llvm' $extra_make_flags EDIS_VERSION=1", "making libedis", 1);
|
||||
# Combine all .o files from a bunch of static libraries from llvm
|
||||
# and clang into a single .a file.
|
||||
create_single_llvm_archive_for_arch ($llvm_dstroot_arch, 1);
|
||||
|
||||
Reference in New Issue
Block a user