Rev 8 | Rev 10 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8 | Rev 9 | ||
---|---|---|---|
Line 231... | Line 231... | ||
231 | # which is defined when either _QNX_SOURCE or __EXT without anything else is defined. This is not correct and low-level libraries |
231 | # which is defined when either _QNX_SOURCE or __EXT without anything else is defined. This is not correct and low-level libraries |
232 | # such as libunwind that do not define either of those fail to build. Also note that a FreeBSD-compatible header was added to the QNX8 |
232 | # such as libunwind that do not define either of those fail to build. Also note that a FreeBSD-compatible header was added to the QNX8 |
233 | # platform SDK: /usr/include/link.h, which defines Elf types as Elf64/Elf32 types depending on the architecture and adds some glue. |
233 | # platform SDK: /usr/include/link.h, which defines Elf types as Elf64/Elf32 types depending on the architecture and adds some glue. |
234 | backup_and_patch_if_necessary "libunwind/src/RWMutex.hpp" __QNXNTO__ 's/#include <pthread.h>/#ifdef __QNXNTO__\n#define __EXT_QNX\n#define __EXT_POSIX1_200112\n#endif\n#include <pthread.h>/g' |
234 | backup_and_patch_if_necessary "libunwind/src/RWMutex.hpp" __QNXNTO__ 's/#include <pthread.h>/#ifdef __QNXNTO__\n#define __EXT_QNX\n#define __EXT_POSIX1_200112\n#endif\n#include <pthread.h>/g' |
235 | 235 | ||
236 | # now configure LLVM |
236 | # now configure LLVM -- and use ccache |
237 | echo "Configuring LLVM build..." |
237 | echo "Configuring LLVM build..." |
- | 238 | export CCACHE_DIR="$(realpath "../${LLVM_SOURCES_DIR}/.ccache")" |
|
238 | cmake \ |
239 | cmake \ |
239 | -D CMAKE_TOOLCHAIN_FILE="${TARGET_TRIPLE}.cmake" \ |
240 | -D CMAKE_TOOLCHAIN_FILE="${TARGET_TRIPLE}.cmake" \ |
240 | -D CMAKE_BUILD_TYPE="MinSizeRel" \ |
241 | -D CMAKE_BUILD_TYPE="MinSizeRel" \ |
241 | -D CMAKE_INSTALL_PREFIX="/tmp/qnxsdk/host/qnx$(echo "${QNXSDK_VERSION}"|awk -F. '{print $1}')/${BUILD_TARGET_ARCH}" \ |
242 | -D CMAKE_INSTALL_PREFIX="/tmp/qnxsdk/host/qnx$(echo "${QNXSDK_VERSION}"|awk -F. '{print $1}')/${BUILD_TARGET_ARCH}" \ |
242 | -D CMAKE_STAGING_PREFIX="/usr/bin" \ |
243 | -D CMAKE_STAGING_PREFIX="/usr/bin" \ |
- | 244 | -D CMAKE_C_COMPILER_LAUNCHER="ccache" \ |
|
- | 245 | -D CMAKE_CXX_COMPILER_LAUNCHER="ccache" \ |
|
243 | -D LLVM_HOST_TRIPLE="${TARGET_TRIPLE}" \ |
246 | -D LLVM_HOST_TRIPLE="${TARGET_TRIPLE}" \ |
244 | -D LLVM_ENABLE_PROJECTS="clang;lld" \ |
247 | -D LLVM_ENABLE_PROJECTS="clang;lld" \ |
245 | -D LLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \ |
248 | -D LLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \ |
246 | -D LLVM_TARGETS_TO_BUILD="AArch64;X86" \ |
249 | -D LLVM_TARGETS_TO_BUILD="AArch64;X86" \ |
247 | -D COMPILER_RT_BUILD_SANITIZERS="OFF" \ |
250 | -D COMPILER_RT_BUILD_SANITIZERS="OFF" \ |