Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 3.92 KB

INSTALL.md

File metadata and controls

45 lines (29 loc) · 3.92 KB

Byfl installation

Byfl relies on LLVM and Clang and can take advantage of Flang (not yet thoroughly tested). The env section of Byfl's Travis CI configuration file indicates the LLVM/Clang versions that are currently being used for regression testing and can therefore be considered the most stable.

Basic installation

Once you've downloaded Byfl, follow the usual CMake build procedure:

cd Byfl
mkdir build
cd build
cmake ..
make
make install

You may also want to run make test to verify the build.

Some commonly used cmake options include -DCMAKE_INSTALL_PREFIX=〈directory〉 to specify the top-level installation directory (default: /usr/local) and -DCMAKE_C_FLAGS=〈flags〉 (and respectively, -DCMAKE_CXX_FLAGS and -DCMAKE_Fortran_FLAGS), which may be needed to point the compiler to the LLVM include directory, as in -DCMAKE_C_FLAGS="-I/usr/include/llvm-8".

You may want to use CMake's graphical cmake-gui or curses-based ccmake front ends instead of cmake to configure Byfl and generate Makefiles. Enable advanced mode to see the complete list of user-configurable parameters.

Installation on Mac OS X

A few extra steps are needed to build Byfl on OS X:

  1. Install Xcode, which provides various standard tools, header files, and libraries.

  2. Install the Xcode command-line tools with xcode-select --install.

  3. To avoid having to manually specify long directory names in which to search for standard headers and libraries, install the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package (or the corresponding package for your OS X version).

You'll also need to install CMake, LLVM, and Clang. (The version of LLVM/Clang installed as part of Xcode lacks the CMake support files Byfl relies on.) My preferred approach is to use the Homebrew package manager:

  1. Follow the instructions on http://brew.sh/ to install Homebrew.

  2. Install CMake, LLVM, and Clang with brew install cmake llvm. (The Homebrew llvm package includes Clang; there's not a separate package for it.)

Other information

Previously, the Byfl repository provided a separate branch for each supported LLVM version due to significant API differences across even minor versions. Because LLVM's APIs have more-or-less stabilized, the corresponding branches have since been removed and versions of LLVM prior to 6.0 are no longer supported. The old Byfl branches were first snapshotted as the tags llvm-3.5-final, llvm-3.6-final, llvm-3.7-final, llvm-3.8-final, llvm-3.9-final, llvm-4.0-final, llvm-5.0-final, llvm-6.0-final, and llvm-7.0-final for posterity.