diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 2901257ea8b6..b22efdf8cf4f 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -26,7 +26,7 @@ else() set(cmake_3_2_USES_TERMINAL USES_TERMINAL) endif() -project(LLVM) +project(LLVM C CXX ASM) # The following only works with the Ninja generator in CMake >= 3.0. set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index 47de43c7731b..bee77c14b5b4 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -166,6 +166,7 @@ function(add_flag_or_print_warning flag name) message(STATUS "Building with ${flag}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}" PARENT_SCOPE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}" PARENT_SCOPE) + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${flag}" PARENT_SCOPE) else() message(WARNING "${flag} is not supported.") endif()