[lld] Require C++14 in LLD standalone build

This is what the Clang standalone build does too. And setting this
seems to be required to get the standalone build to work on my Mac.

Reviewed By: #lld-macho, MaskRay, Ericson2314, smeenai

Differential Revision: https://reviews.llvm.org/D120269
This commit is contained in:
Jez Ng 2022-02-22 18:14:47 -05:00
parent ed4f0cb878
commit 606cb8548a
1 changed files with 4 additions and 0 deletions

View File

@ -11,6 +11,10 @@ endif()
include(GNUInstallDirs)
if(LLD_BUILT_STANDALONE)
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Rely on llvm-config.