Skip to content

Conversation

@ronlieb
Copy link
Collaborator

@ronlieb ronlieb commented Oct 27, 2025

This opt-in cmake feature allows for fortran or some other product built on MLIR to restrict the MLIR archives installed into lib.

provides a cmake function 'add_subdirectory_optional_install' which wrap add_subdirectory to provide capability to suppress installation using 'EXCLUDE_FROM_ALL'.

SUMMARY with MLIR_SUPPRESS_LIB_INSTALL ON

Suppresses installation of libMLIR* archives
414 libMLIR*.a

Suppresses installation of objects-Release
42 obj.* directories
49 .o files within

4 files remain, required for build:
libMLIRMlirOptMain.a
libMLIRRegisterAllDialects.a
libMLIRRegisterAllExtensions.a
libMLIRRegisterAllPasses.a

if built shared, then we retain libMLIR.so

This opt-in cmake feature allows for fortran or some other product
built on MLIR to restrict the MLIR archives installed into lib.

provides a cmake function 'add_subdirectory_optional_install'
which wrap add_subdirectory to provide capability to suppress
installation using 'EXCLUDE_FROM_ALL'.

SUMMARY with MLIR_SUPPRESS_LIB_INSTALL ON

Suppresses installation of libMLIR* archives
  414 libMLIR*.a

Suppresses installation of objects-Release
  42 obj.* directories
  49 .o files within

4 files remain, required for build:
libMLIRMlirOptMain.a
libMLIRRegisterAllDialects.a
libMLIRRegisterAllExtensions.a
libMLIRRegisterAllPasses.a

if built shared, then we retain libMLIR.so
@ronlieb
Copy link
Collaborator Author

ronlieb commented Oct 27, 2025

for downstream review, with intent to upstream

@z1-cciauto
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants