
Pass plugins are compiled and linked dynamically by default. Setting `LLVM_${NAME}_LINK_INTO_TOOLS` to `ON` turns the project into a statically linked extension. Projects like Polly can be used this way by adding `-DLLVM_POLLY_LINK_INTO_TOOLS=ON` to the `cmake` command. The changes in this patch makes the PassBuilder in Flang aware of statically linked pass plugins, see the documentation for more details: https://github.com/llvm/llvm-project/blob/main/llvm/docs/WritingAnLLVMNewPMPass.rst#id21 Differential Revision: https://reviews.llvm.org/D137673 Change-Id: Id1aa501dcb4821d0ec779f375cc8e8d6b0b92fce
18 lines
430 B
Fortran
18 lines
430 B
Fortran
! Verify that the static and dynamically loaded pass plugins work as expected.
|
|
|
|
! UNSUPPORTED: system-windows
|
|
|
|
! REQUIRES: plugins, shell, examples
|
|
|
|
! RUN: %flang -S %s %loadbye -Xflang -fdebug-pass-manager -o /dev/null \
|
|
! RUN: 2>&1 | FileCheck %s
|
|
|
|
! RUN: %flang_fc1 -S %s %loadbye -fdebug-pass-manager -o /dev/null \
|
|
! RUN: 2>&1 | FileCheck %s
|
|
|
|
|
|
! CHECK: Running pass: {{.*}}Bye on empty_
|
|
|
|
subroutine empty
|
|
end subroutine empty
|