Commit 37048f66 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Reland "Clang: stop building with GCC/libstdc++ from Ubuntu Precise (roll 338452-1:338452-2)"

This is a reland of 1501aabf
The goma failures which caused the previous revert are believe to be flaky.

Original change's description:
> Clang: stop building with GCC/libstdc++ from Ubuntu Precise (roll 338452-1:338452-2)
>
> Previously we used a GCC/libstdc++ package from Ubuntu Precise to build a Clang
> that would work on Precise or later. These days, all bots and developers are on
> Trusty or later, so this should no longer be necessary.
>
> Bug: none
> Change-Id: I518ee55d07c04dc89163fe262c81d935e05fed78
> Reviewed-on: https://chromium-review.googlesource.com/1183915
> Reviewed-by: Nico Weber <thakis@chromium.org>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Commit-Queue: Hans Wennborg <hans@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#585067}

TBR=thakis

Bug: none
Change-Id: Ibd2be5064bbdf0ed36aa09c0525825c530465813
Reviewed-on: https://chromium-review.googlesource.com/1185684Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585318}
parent 2ae0e929
...@@ -35,7 +35,7 @@ if use_head_revision: ...@@ -35,7 +35,7 @@ if use_head_revision:
CLANG_REVISION = 'HEAD' CLANG_REVISION = 'HEAD'
# This is incremented when pushing a new build of Clang at the same revision. # This is incremented when pushing a new build of Clang at the same revision.
CLANG_SUB_REVISION=1 CLANG_SUB_REVISION=2
PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION)
...@@ -307,18 +307,6 @@ def CreateChromeToolsShim(): ...@@ -307,18 +307,6 @@ def CreateChromeToolsShim():
f.write('endif (CHROMIUM_TOOLS_SRC)\n') f.write('endif (CHROMIUM_TOOLS_SRC)\n')
def DownloadHostGcc(args):
"""Downloads gcc 4.8.5 and makes sure args.gcc_toolchain is set."""
if not sys.platform.startswith('linux') or args.gcc_toolchain:
return
gcc_dir = os.path.join(LLVM_BUILD_TOOLS_DIR, 'gcc485precise')
if not os.path.exists(gcc_dir):
print 'Downloading pre-built GCC 4.8.5...'
DownloadAndUnpack(
CDS_URL + '/tools/gcc485precise.tgz', LLVM_BUILD_TOOLS_DIR)
args.gcc_toolchain = gcc_dir
def AddSvnToPathOnWin(): def AddSvnToPathOnWin():
"""Download svn.exe and add it to PATH.""" """Download svn.exe and add it to PATH."""
if sys.platform != 'win32': if sys.platform != 'win32':
...@@ -501,7 +489,6 @@ def UpdateClang(args): ...@@ -501,7 +489,6 @@ def UpdateClang(args):
print 'Removing old lib dir: %s' % old_lib_dir print 'Removing old lib dir: %s' % old_lib_dir
RmTree(old_lib_dir) RmTree(old_lib_dir)
DownloadHostGcc(args)
AddCMakeToPath(args) AddCMakeToPath(args)
AddGnuWinToPath() AddGnuWinToPath()
...@@ -514,21 +501,6 @@ def UpdateClang(args): ...@@ -514,21 +501,6 @@ def UpdateClang(args):
cc, cxx = None, None cc, cxx = None, None
libstdcpp = None libstdcpp = None
if args.gcc_toolchain: # This option is only used on Linux.
# Use the specified gcc installation for building.
cc = os.path.join(args.gcc_toolchain, 'bin', 'gcc')
cxx = os.path.join(args.gcc_toolchain, 'bin', 'g++')
if not os.access(cc, os.X_OK):
print 'Invalid --gcc-toolchain: "%s"' % args.gcc_toolchain
print '"%s" does not appear to be valid.' % cc
return 1
# Set LD_LIBRARY_PATH to make auxiliary targets (tablegen, bootstrap
# compiler, etc.) find the .so.
libstdcpp = subprocess.check_output(
[cxx, '-print-file-name=libstdc++.so.6']).rstrip()
os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp)
cflags = [] cflags = []
cxxflags = [] cxxflags = []
...@@ -578,11 +550,6 @@ def UpdateClang(args): ...@@ -578,11 +550,6 @@ def UpdateClang(args):
cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang') cc = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang')
cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++') cxx = os.path.join(LLVM_BOOTSTRAP_INSTALL_DIR, 'bin', 'clang++')
if args.gcc_toolchain:
# Tell the bootstrap compiler to use a specific gcc prefix to search
# for standard library headers and shared object files.
cflags = ['--gcc-toolchain=' + args.gcc_toolchain]
cxxflags = ['--gcc-toolchain=' + args.gcc_toolchain]
print 'Building final compiler' print 'Building final compiler'
# LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is # LLVM uses C++11 starting in llvm 3.5. On Linux, this means libstdc++4.7+ is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment