From 768e328302027a004dd5fab69eeae1152aa4a42c Mon Sep 17 00:00:00 2001 From: Wenju He Date: Mon, 6 Oct 2025 13:31:46 +0200 Subject: [PATCH] [libclc] Remove -fno-builtin from compile options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The flag was added in commit 5631a959571c to suppress build warning and is no longer needed. It adds "no-builtins" attribute, which prevents libclc functions from being inlined into caller that don't have the attribute. The flag is meant to prevent folding standard library calls into optimized implementations. For libclc device targets, however, such target‑driven folding is desirable. llvm-diff shows no change to amdgcn--amdhsa.bc and nvptx--nvidiacl.bc. Co-authored-by: Mészáros Gergely --- libclc/cmake/modules/AddLibclc.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake index 22dfaac9779a8..614f9e3790a3c 100644 --- a/libclc/cmake/modules/AddLibclc.cmake +++ b/libclc/cmake/modules/AddLibclc.cmake @@ -353,7 +353,7 @@ function(add_libclc_builtin_set) TRIPLE ${ARG_TRIPLE} INPUT ${input_file} OUTPUT ${output_file} - EXTRA_OPTS -fno-builtin -nostdlib "${ARG_COMPILE_FLAGS}" + EXTRA_OPTS -nostdlib "${ARG_COMPILE_FLAGS}" "${file_specific_compile_options}" -I${CMAKE_CURRENT_SOURCE_DIR}/${file_dir} DEPENDENCIES ${input_file_dep}