Skip to content

[libclc] Don't run remangler on OpenCL library #18697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
ARCH_SUFFIX libspirv-${arch_suffix}
TRIPLE ${clang_triple}
TARGET_ENV libspirv-
REMANGLE ${LIBCLC_GENERATE_REMANGLED_VARIANTS}
COMPILE_FLAGS ${spirv_build_flags}
OPT_FLAGS ${opt_flags}
LIB_FILES ${libspirv_lib_files}
Expand Down
6 changes: 4 additions & 2 deletions libclc/cmake/modules/AddLibclc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ endfunction()
# Optimization options (for opt)
# * TARGET_ENV <string>
# Prefix to give the final builtin library aliases
# * REMANGLE <string>
# Bool string indicating whether remangler will be run
# * ALIASES <string> ...
# List of aliases
# * INTERNAL_LINK_DEPENDENCIES <target> ...
Expand All @@ -318,7 +320,7 @@ endfunction()
function(add_libclc_builtin_set)
cmake_parse_arguments(ARG
"CLC_INTERNAL"
"ARCH;TRIPLE;ARCH_SUFFIX;TARGET_ENV;PARENT_TARGET"
"ARCH;TRIPLE;ARCH_SUFFIX;TARGET_ENV;REMANGLE;PARENT_TARGET"
"LIB_FILES;GEN_FILES;COMPILE_FLAGS;OPT_FLAGS;ALIASES;INTERNAL_LINK_DEPENDENCIES"
${ARGN}
)
Expand Down Expand Up @@ -483,7 +485,7 @@ function(add_libclc_builtin_set)
install( FILES ${builtins_lib} DESTINATION ${CMAKE_INSTALL_DATADIR}/clc )

# Generate remangled variants if requested
if( LIBCLC_GENERATE_REMANGLED_VARIANTS )
if( ARG_REMANGLE )
set( dummy_in ${LIBCLC_LIBRARY_OUTPUT_INTDIR}/libclc_dummy_in.cc )
add_custom_command( OUTPUT ${dummy_in}
COMMAND ${CMAKE_COMMAND} -E make_directory ${LIBCLC_LIBRARY_OUTPUT_INTDIR}
Expand Down