Commit 0546b353 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Clang: stop building with GCC/libstdc++ from Ubuntu Precise

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.

Besides simplifying things, this allows us to easier move to using the
latest CMake when building Clang, because it was built with a newer
libstdc++ than the Precise one.

Bug: 797991
Change-Id: I528825389241f60ccc96167015370cd5e285725d
Reviewed-on: https://chromium-review.googlesource.com/1188679Reviewed-by: default avatarReid Kleckner <rnk@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585953}
parent 9ee2a714
...@@ -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