[clang] [clang-tools-extra] [clangd] Update clangDaemonTweaks to set symbol visibility macros (PR #112304)

Chris B via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 11 13:49:52 PST 2024


================
@@ -114,7 +114,7 @@ macro(add_clang_library name)
     if(TARGET "obj.${name}")
       target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC)
     endif()
-  elseif(NOT ARG_SHARED AND NOT ARG_STATIC)
+  elseif(NOT ARG_SHARED AND NOT ARG_STATIC AND NOT ARG_CLANG_IMPORT)
----------------
llvm-beanz wrote:

`cmake_parse_args` always defines option values:

> For the <options> keywords, these variables will always be defined, and they will be set to TRUE if the keyword is present, or FALSE if it is not.

see: https://cmake.org/cmake/help/latest/command/cmake_parse_arguments.html

So `ARG_CLANG_IMPORT` will always be defined, it may be defined either to `True` or `False`.


https://github.com/llvm/llvm-project/pull/112304


More information about the cfe-commits mailing list