Skip to content

Commit

Permalink
[Cmake] Add an option to build LLVM using the experimental new pass m…
Browse files Browse the repository at this point in the history
…anager

Add LLVM_USE_NEWPM to build LLVM using the experimental new pass manager.

Differential Revision: http://reviews.llvm.org/D57068

llvm-svn: 353550
  • Loading branch information
xur-llvm committed Feb 8, 2019
1 parent ae2f951 commit 017bbd9
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
@@ -784,6 +784,16 @@ if(LLVM_ENABLE_EH AND NOT LLVM_ENABLE_RTTI)
message(FATAL_ERROR "Exception handling requires RTTI. You must set LLVM_ENABLE_RTTI to ON")
endif()

option(LLVM_USE_NEWPM "Build LLVM using the experimental new pass manager" Off)
mark_as_advanced(LLVM_USE_NEWPM)
if (LLVM_USE_NEWPM)
append("-fexperimental-new-pass-manager"
CMAKE_CXX_FLAGS
CMAKE_C_FLAGS
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS)
endif()

option(LLVM_ENABLE_IR_PGO "Build LLVM and tools with IR PGO instrumentation (deprecated)" Off)
mark_as_advanced(LLVM_ENABLE_IR_PGO)

3 changes: 3 additions & 0 deletions llvm/docs/CMake.rst
Original file line number Diff line number Diff line change
@@ -582,6 +582,9 @@ LLVM-specific variables
If enabled, the compiler version check will only warn when using a toolchain
which is about to be deprecated, instead of emitting an error.

**LLVM_USE_NEWPM**:BOOL
If enabled, use the experimental new pass manager.

CMake Caches
============

0 comments on commit 017bbd9

Please sign in to comment.