| ... | @@ -47,15 +47,20 @@ option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF) | ... | @@ -47,15 +47,20 @@ option(ZIG_TEST_COVERAGE "Build Zig with test coverage instrumentation" OFF) |
| 47 | option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead of the embedded LLD" OFF) | 47 | option(ZIG_FORCE_EXTERNAL_LLD "If your system has the LLD patches use it instead of the embedded LLD" OFF) |
| 48 | | 48 | |
| 49 | find_package(llvm) | 49 | find_package(llvm) |
| 50 | include_directories(${LLVM_INCLUDE_DIRS}) | | |
| 51 | | | |
| 52 | find_package(clang) | 50 | find_package(clang) |
| 53 | include_directories(${CLANG_INCLUDE_DIRS}) | | |
| 54 | | 51 | |
| 55 | if(ZIG_FORCE_EXTERNAL_LLD) | 52 | if(ZIG_FORCE_EXTERNAL_LLD) |
| 56 | find_package(lld) | 53 | find_package(lld) |
| | 54 | include_directories(${LLVM_INCLUDE_DIRS}) |
| 57 | include_directories(${LLD_INCLUDE_DIRS}) | 55 | include_directories(${LLD_INCLUDE_DIRS}) |
| | 56 | include_directories(${CLANG_INCLUDE_DIRS}) |
| 58 | else() | 57 | else() |
| | 58 | # This goes first so that we find embedded LLD instead |
| | 59 | # of system LLD. |
| | 60 | include_directories("${CMAKE_SOURCE_DIR}/deps/lld/include") |
| | 61 | |
| | 62 | include_directories(${LLVM_INCLUDE_DIRS}) |
| | 63 | include_directories(${CLANG_INCLUDE_DIRS}) |
| 59 | set(EMBEDDED_LLD_LIB_SOURCES | 64 | set(EMBEDDED_LLD_LIB_SOURCES |
| 60 | "${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp" | 65 | "${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp" |
| 61 | "${CMAKE_SOURCE_DIR}/deps/lld/lib/Config/Version.cpp" | 66 | "${CMAKE_SOURCE_DIR}/deps/lld/lib/Config/Version.cpp" |