[libclc] Enable -fdiscard-value-names build flag to reduce bitcode size (#149016)

The flag reduces nvptx64--nvidiacl.bc size from 10.6MB to 5.2MB.
This commit is contained in:
Wenju He 2025-07-17 08:04:33 +08:00 committed by GitHub
parent 210cf010c3
commit 9d78eb5cc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -405,6 +405,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
-I${CMAKE_CURRENT_SOURCE_DIR}/clc/include
# Error on undefined macros
-Werror=undef
-fdiscard-value-names
)
if( NOT "${cpu}" STREQUAL "" )