From eac5abe3207d27911e9a0b107d43e02dd864a19f Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Tue, 29 Jul 2025 16:13:19 -0700 Subject: [PATCH] Fix llvm_process_sources to append source file properties instead of overriding it This fixes the CLANG_VENDOR macro that disappeared because it is set using the same mechanism and one was overriding the other. --- llvm/cmake/modules/LLVMProcessSources.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake index a7f9517ad767c..6282b26bddded 100644 --- a/llvm/cmake/modules/LLVMProcessSources.cmake +++ b/llvm/cmake/modules/LLVMProcessSources.cmake @@ -62,7 +62,10 @@ function(llvm_process_sources OUT_VAR) get_filename_component(suf ${fn} EXT) if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c") get_filename_component(short_name ${fn} NAME) - set_source_files_properties(${fn} PROPERTIES COMPILE_DEFINITIONS "__SHORT_FILE__=\"${short_name}\"") + set_property( + SOURCE ${fn} + APPEND + PROPERTY COMPILE_DEFINITIONS __SHORT_FILE__="${short_name}") endif() endforeach()