Skip to content

Commit 12459bb

Browse files
committed
cmake: do not use Clang anymore to build the helper bootstrap
1 parent 2612d68 commit 12459bb

File tree

1 file changed

+1
-72
lines changed

1 file changed

+1
-72
lines changed

CMakeLists.txt

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -113,76 +113,5 @@ if (BUILD_NACL_LOADER)
113113
endif()
114114

115115
if (BUILD_NACL_HELPER_BOOTSTRAP)
116-
option(BUILD_NACL_HELPER_BOOTSTRAP_WITH_CLANG "Build the nacl_helper_bootstrap program with Clang." ON)
117-
endif()
118-
119-
if (BUILD_NACL_HELPER_BOOTSTRAP)
120-
if (DAEMON_C_COMPILER_Clang_COMPATIBILITY)
121-
set(BUILD_BOOTSTRAP_DIRECTLY ON)
122-
elseif (NOT BUILD_NACL_HELPER_BOOTSTRAP_WITH_CLANG)
123-
set(BUILD_BOOTSTRAP_DIRECTLY ON)
124-
endif()
125-
126-
if (BUILD_BOOTSTRAP_DIRECTLY)
127-
add_subdirectory(src/trusted/service_runtime/linux)
128-
else()
129-
if (CMAKE_GENERATOR MATCHES "Visual Studio")
130-
set(BOOTSTRAP_GENERATOR "NMake Makefiles")
131-
else()
132-
set(BOOTSTRAP_GENERATOR "${CMAKE_GENERATOR}")
133-
endif()
134-
135-
find_program(CLANG_C_COMPILER NAMES "clang" DOC "Path to the Clang C compiler." REQUIRED)
136-
find_program(CLANG_CXX_COMPILER NAMES "clang++" DOC "Path to the Clang C++ compiler." REQUIRED)
137-
find_program(CLANG_ASM_COMPILER NAMES "clang" DOC "Path to the Clang Asm compiler." REQUIRED)
138-
139-
if (NOT COMPILER_TARGET)
140-
execute_process(COMMAND "${CMAKE_CXX_COMPILER}" -dumpmachine
141-
OUTPUT_VARIABLE COMPILER_TARGET
142-
OUTPUT_STRIP_TRAILING_WHITESPACE
143-
# CMake 3.18.4 from Debian Buster doesn't support that option:
144-
# COMMAND_ERROR_IS_FATAL ANY
145-
)
146-
147-
if (NOT COMPILER_TARGET)
148-
message(FATAL_ERROR "Failed to read the compiler target.")
149-
endif()
150-
endif()
151-
152-
foreach(inherited_option ${INHERITED_OPTIONS})
153-
list(APPEND INHERITED_OPTION_ARGS "-D${inherited_option}=${${inherited_option}}")
154-
endforeach()
155-
156-
set(BOOTSTRAP_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/nacl_helper_bootstrap-build")
157-
158-
include(ExternalProject)
159-
160-
ExternalProject_Add(nacl_helper_bootstrap-project
161-
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
162-
BINARY_DIR "${BOOTSTRAP_BUILD_DIR}"
163-
CMAKE_GENERATOR "${BOOTSTRAP_GENERATOR}"
164-
CMAKE_ARGS
165-
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
166-
"-DCMAKE_C_COMPILER=${CLANG_C_COMPILER}"
167-
"-DCMAKE_CXX_COMPILER=${CLANG_CXX_COMPILER}"
168-
"-DCMAKE_ASM_COMPILER=${CLANG_ASM_COMPILER}"
169-
"-DCMAKE_C_COMPILER_TARGET=${COMPILER_TARGET}"
170-
"-DCMAKE_CXX_COMPILER_TARGET=${COMPILER_TARGET}"
171-
"-DCMAKE_ASM_COMPILER_TARGET=${COMPILER_TARGET}"
172-
-DBUILD_NACL_LOADER=OFF
173-
-DBUILD_NACL_HELPER_BOOTSTRAP=ON
174-
${INHERITED_OPTION_ARGS}
175-
# CMake 3.18.4 from Debian Buster doesn't support that option:
176-
# INSTALL_BYPRODUCTS
177-
INSTALL_COMMAND echo
178-
)
179-
180-
add_custom_target(nacl_helper_bootstrap ALL
181-
COMMAND "${CMAKE_COMMAND}" -E copy "${BOOTSTRAP_BUILD_DIR}/nacl_helper_bootstrap"
182-
"${CMAKE_CURRENT_BINARY_DIR}/nacl_helper_bootstrap"
183-
BYPRODUCTS
184-
"${CMAKE_CURRENT_BINARY_DIR}/nacl_helper_bootstrap"
185-
DEPENDS nacl_helper_bootstrap-project
186-
)
187-
endif()
116+
add_subdirectory(src/trusted/service_runtime/linux)
188117
endif()

0 commit comments

Comments
 (0)