Skip to content

[mlir][install] cmake to suppress install of libMLIR*.a and .o's and …#913

Open
ronlieb wants to merge 1 commit into
amd-stagingfrom
origin/amd/dev/rliebermMLIRlibsIncsCleanup
Open

[mlir][install] cmake to suppress install of libMLIR*.a and .o's and …#913
ronlieb wants to merge 1 commit into
amd-stagingfrom
origin/amd/dev/rliebermMLIRlibsIncsCleanup

Conversation

@ronlieb

@ronlieb ronlieb commented Dec 21, 2025

Copy link
Copy Markdown
Collaborator

….h's

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

….h's

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 ronlieb requested a review from dpalermo December 21, 2025 21:12
@z1-cciauto

Copy link
Copy Markdown
Collaborator

@ronlieb ronlieb requested review from a team and removed request for a team December 28, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants