[flang-commits] [flang] f1dde54 - [flang] Export fir-opt symbols for MLIR dialect/pass plugins (#212152)

via flang-commits flang-commits at lists.llvm.org
Tue Aug 4 00:10:39 PDT 2026


Author: Valentin Churavy
Date: 2026-08-04T09:10:33+02:00
New Revision: f1dde546716c51d3e8d619778c0b1198fc86007b

URL: https://github.com/llvm/llvm-project/commit/f1dde546716c51d3e8d619778c0b1198fc86007b
DIFF: https://github.com/llvm/llvm-project/commit/f1dde546716c51d3e8d619778c0b1198fc86007b.diff

LOG: [flang] Export fir-opt symbols for MLIR dialect/pass plugins (#212152)

Lets plugins loaded with --load-dialect-plugin / --load-pass-plugin
resolve
MLIR and LLVM symbols against fir-opt, as mlir-opt already does.

---------

Co-authored-by: Claude Opus 4.8 <noreply at anthropic.com>

Added: 
    

Modified: 
    flang/tools/fir-opt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/tools/fir-opt/CMakeLists.txt b/flang/tools/fir-opt/CMakeLists.txt
index 2697f74c2f0b8..588d15f2092ce 100644
--- a/flang/tools/fir-opt/CMakeLists.txt
+++ b/flang/tools/fir-opt/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_flang_tool(fir-opt fir-opt.cpp)
-llvm_update_compile_flags(fir-opt)
+
 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
 get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
 
@@ -51,3 +51,8 @@ mlir_target_link_libraries(fir-opt PRIVATE
   MLIRVectorToLLVM
   MLIROptLib
 )
+
+llvm_update_compile_flags(fir-opt)
+
+mlir_check_all_link_libraries(fir-opt)
+export_executable_symbols_for_plugins(fir-opt)


        


More information about the flang-commits mailing list