Files
swift-mirror/docs/Ubuntu14.md
Kevin Sweeney f1740bddc0 SR-8925: Require clang-3.9 on Ubuntu 14.04
Since commit 3469797d changed to build libdispatch for SourceKit with the
host compiler, we now require a clang with builtin `__builtin_add_overflow`.
Since Ubuntu 14 repositories have a clang that supports this update our
build instructions to use it.

Resolves [SR-8925](https://bugs.swift.org/browse/SR-8925).
2018-10-05 16:04:09 +00:00

1.0 KiB

Getting Started with Swift on Ubuntu 14.04

Upgrade Clang

You'll need to upgrade your clang compiler for C++14 support and create a symlink. The minimum required version of clang may change, and may not be available on Ubuntu 14.04 in the future.

sudo apt-get install clang-3.9
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-3.9 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-3.9 100
sudo update-alternatives --set clang /usr/bin/clang-3.9
sudo update-alternatives --set clang++ /usr/bin/clang++-3.9

Upgrade CMake

You'll need to upgrade your CMake toolchain to a supported version by building a local copy. The minimum required version of CMake may change, and may not be available on Ubuntu 14.04 in the future.

wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz
tar xf cmake-3.5.2.tar.gz
cd cmake-3.5.2
./configure
make
sudo make install
sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
cmake --version # This should print 3.5.2