

GCC and Clang can emulate thread-local storage even on versions of macOS that do not support it. However, the C++11 thread_local keyword was not supported until Xcode 8 (see release notes, WWDC presentation). The compilers provided by Xcode only support thread-local storage if the OS supports it, which did not happen until Mac OS X Lion. To implement it, MPICH and Open MPI provide wrappers for Clang, GCC, and Xcode. None of the compilers provided by Xcode implement MPI. OpenMP Standards supported by Clang, GCC, and Xcode:įor LLVM Clang 3.9 through 9.0, only OpenMP 3.1 support is enabled by default enabling OpenMP 4.0 or 4.5 support requires specifying the corresponding -fopenmp-version=40 or -fopenmp-version=45 flag. None of the compilers provided by Xcode support any version OpenMP. The compilers provided by Xcode do not support all of the methods of parallelism that ports may require. C++ Standards supported by Clang, GCC, and Xcode: MacPorts have two alternates to provide C and C++ compilers: Clang and GCC.Ī project can require a more recent C standard or C++ standard than is provided by the Xcode compiler.Ĭ Standards supported by Clang, GCC, and Xcode: This ideal, however, cannot always be achieved. Ideally, Xcode would provide the C and C++ compilers.

If MacPorts provides the compiler, the appropriate dependencies are added.The environment variables CC and CXX are set during the configure phase if use_configure is yes (the default)., configure.cxx, and configure.cpp are set.This means that, unless instructed otherwise, each Portfile will have access to a compiler for both of these languages. C and C++ are fully supported in the base. These commands do nothing more than set environment variables during the configure phase if use_configure is yes. However, some language have direct support in the MacPorts base. The port lapack-manpages builds documentation by calling doxygen.Ĭommonality among several ports can be gathered into a portgroup.įor example, there is a portgroup that facilitates building projects written in Rust. The lowest level of support is for a Portfile to call the appropriate build command. The flexibility of a Portfile allows MacPorts to support a wide variety of languages. The following most-commonly used Portfile commands will choose a set of appropriate compilers with the required capability for a given OS version:įor further details and more related options, please read on.
