@@ -2,8 +2,6 @@ cmake_minimum_required(VERSION 3.13.4)
2
2
3
3
set (CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON )
4
4
5
- option (FLANG_BUILD_NEW_DRIVER "Build the flang compiler driver" OFF )
6
-
7
5
# Flang requires C++17.
8
6
set (CMAKE_CXX_STANDARD 17 )
9
7
set (CMAKE_CXX_STANDARD_REQUIRED TRUE )
@@ -49,11 +47,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
49
47
get_filename_component (LLVM_DIR_ABSOLUTE ${LLVM_DIR} REALPATH )
50
48
list (APPEND CMAKE_MODULE_PATH ${LLVM_DIR_ABSOLUTE} )
51
49
52
- if (FLANG_BUILD_NEW_DRIVER )
53
- # TODO: Remove when libclangDriver is lifted out of Clang
54
- list (APPEND CMAKE_MODULE_PATH ${CLANG_DIR} )
55
- find_package (Clang REQUIRED HINTS "${CLANG_DIR} " )
56
- endif ()
50
+ # TODO: Remove when libclangDriver is lifted out of Clang
51
+ list (APPEND CMAKE_MODULE_PATH ${CLANG_DIR} )
52
+ find_package (Clang REQUIRED HINTS "${CLANG_DIR} " )
57
53
58
54
find_package (MLIR REQUIRED HINTS "${MLIR_CMAKE_PATH} " )
59
55
list (APPEND CMAKE_MODULE_PATH ${MLIR_DIR} )
@@ -74,9 +70,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
74
70
include (VersionFromVCS )
75
71
include (GetErrcMessages )
76
72
77
- if (FLANG_BUILD_NEW_DRIVER )
78
- include (AddClang )
79
- endif ()
73
+ include (AddClang )
80
74
81
75
include (TableGen )
82
76
find_package (MLIR REQUIRED CONFIG )
@@ -199,20 +193,18 @@ endif()
199
193
set (FLANG_INCLUDE_DIR ${FLANG_BINARY_DIR} /include )
200
194
set (FLANG_INTRINSIC_MODULES_DIR ${CMAKE_BINARY_DIR} /include/flang )
201
195
202
- if (FLANG_BUILD_NEW_DRIVER )
203
- # TODO: Remove when libclangDriver is lifted out of Clang
204
- if (FLANG_STANDALONE_BUILD )
205
- set (CLANG_INCLUDE_DIR ${CLANG_INCLUDE_DIRS} )
206
- # No need to specify TableGen output dir as that's embedded in CLANG_DIR
207
- else ()
208
- set (CLANG_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR} /../clang/include )
209
- # Specify TableGen output dir for things like DiagnosticCommonKinds.inc,
210
- # DiagnosticDriverKinds.inc (required for reporting diagnostics)
211
- set (CLANG_TABLEGEN_OUTPUT_DIR ${CMAKE_BINARY_DIR} /tools/clang/include )
212
- include_directories (SYSTEM ${CLANG_TABLEGEN_OUTPUT_DIR} )
213
- endif ()
214
- include_directories (SYSTEM ${CLANG_INCLUDE_DIR} )
196
+ # TODO: Remove when libclangDriver is lifted out of Clang
197
+ if (FLANG_STANDALONE_BUILD )
198
+ set (CLANG_INCLUDE_DIR ${CLANG_INCLUDE_DIRS} )
199
+ # No need to specify TableGen output dir as that's embedded in CLANG_DIR
200
+ else ()
201
+ set (CLANG_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR} /../clang/include )
202
+ # Specify TableGen output dir for things like DiagnosticCommonKinds.inc,
203
+ # DiagnosticDriverKinds.inc (required for reporting diagnostics)
204
+ set (CLANG_TABLEGEN_OUTPUT_DIR ${CMAKE_BINARY_DIR} /tools/clang/include )
205
+ include_directories (SYSTEM ${CLANG_TABLEGEN_OUTPUT_DIR} )
215
206
endif ()
207
+ include_directories (SYSTEM ${CLANG_INCLUDE_DIR} )
216
208
217
209
include_directories (BEFORE
218
210
${FLANG_BINARY_DIR} /include
0 commit comments